function DevelDumperTestTrait::getDumperExportDump
Same name in other branches
- 5.x tests/src/Kernel/DevelDumperTestTrait.php \Drupal\Tests\devel\Kernel\DevelDumperTestTrait::getDumperExportDump()
Returns a string representation of a variable.
Parameters
mixed $input: The variable to dump.
string $name: (optional) The label to output before variable, defaults to NULL.
Return value
string String representation of a variable.
See also
\Drupal\devel\DevelDumperManager::export()
2 calls to DevelDumperTestTrait::getDumperExportDump()
- DevelDumperTestTrait::assertContainsDumpExport in tests/
src/ Kernel/ DevelDumperTestTrait.php - Asserts that a haystack contains the dump export output.
- DevelDumperTestTrait::assertDumpExportEquals in tests/
src/ Kernel/ DevelDumperTestTrait.php - Assertion for ensure dump content.
File
-
tests/
src/ Kernel/ DevelDumperTestTrait.php, line 107
Class
- DevelDumperTestTrait
- Provides a class for checking dumper output.
Namespace
Drupal\Tests\devel\KernelCode
private function getDumperExportDump($input, $name = NULL) {
$output = \Drupal::service('devel.dumper')->export($input, $name);
return rtrim($output);
}