protected function TocTest::dumpArraySubset in TOC API 8
Dumps TOC array into $this->assertArraySubset() assertion.
Parameters
array $array: A TOC index or tree.
string $method: The TOC method to tests.
File
- tests/
src/ Unit/ TocTest.php, line 467 - Contains \Drupal\Tests\toc_api\Unit\TocTest.
Class
- TocTest
- Tests TOC API formatter.
Namespace
Drupal\Tests\toc_api\UnitCode
protected function dumpArraySubset(array $array, $method) {
$this
->dumpArraySubsetUnset($array);
$var = Variable::export($array);
$var = str_replace('array(', '[', $var);
$var = str_replace('),', '],', $var);
$var = preg_replace('/\\)$/', ']', $var);
print "\n\n\$this->assertArraySubset({$var}, {$method});\n\n";
}