function GraphUnitTest::displayArray

Helper function to output vertices as comma-separated list.

Parameters

$paths: An array containing a list of vertices.

$keys: (optional) Whether to output the keys of $paths instead of the values.

3 calls to GraphUnitTest::displayArray()
GraphUnitTest::assertComponents in drupal/core/modules/system/lib/Drupal/system/Tests/Graph/GraphUnitTest.php
Verify expected components in a graph.
GraphUnitTest::assertPaths in drupal/core/modules/system/lib/Drupal/system/Tests/Graph/GraphUnitTest.php
Verify expected paths in a graph.
GraphUnitTest::assertReversePaths in drupal/core/modules/system/lib/Drupal/system/Tests/Graph/GraphUnitTest.php
Verify expected reverse paths in a graph.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Graph/GraphUnitTest.php, line 190
Definition of Drupal\system\Tests\Graph\GraphUnitTest.

Class

GraphUnitTest
Unit tests for the graph handling features.

Namespace

Drupal\system\Tests\Graph

Code

function displayArray($paths, $keys = FALSE) {
  if (!empty($paths)) {
    return implode(', ', $keys ? array_keys($paths) : $paths);
  }
  else {
    return '(empty)';
  }
}