protected function GraphTest::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 GraphTest::displayArray()

File

drupal/core/tests/Drupal/Tests/Component/Graph/GraphTest.php, line 197
Contains \Drupal\Tests\Component\Graph\GraphTest.

Class

GraphTest
Unit tests for the graph handling features.

Namespace

Drupal\Tests\Component\Graph

Code

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