protected function GraphTest::displayArray in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Graph/GraphTest.php \Drupal\Tests\Component\Graph\GraphTest::displayArray()
- 9 core/tests/Drupal/Tests/Component/Graph/GraphTest.php \Drupal\Tests\Component\Graph\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()
- GraphTest::assertComponents in core/
tests/ Drupal/ Tests/ Component/ Graph/ GraphTest.php - Verify expected components in a graph.
- GraphTest::assertPaths in core/
tests/ Drupal/ Tests/ Component/ Graph/ GraphTest.php - Verify expected paths in a graph.
- GraphTest::assertReversePaths in core/
tests/ Drupal/ Tests/ Component/ Graph/ GraphTest.php - Verify expected reverse paths in a graph.
File
- core/
tests/ Drupal/ Tests/ Component/ Graph/ GraphTest.php, line 192
Class
- GraphTest
- @coversDefaultClass \Drupal\Component\Graph\Graph @group Graph
Namespace
Drupal\Tests\Component\GraphCode
protected function displayArray($paths, $keys = FALSE) {
if (!empty($paths)) {
return implode(', ', $keys ? array_keys($paths) : $paths);
}
else {
return '(empty)';
}
}