public function KernelTestBase::__sleep in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::__sleep()
Prevents serializing any properties.
Kernel tests are run in a separate process. To do this PHPUnit creates a script to run the test. If it fails, the test result object will contain a stack trace which includes the test object. It will attempt to serialize it. Returning an empty array prevents it from serializing anything it should not.
Return value
array An empty array.
See also
vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist
File
- core/
tests/ Drupal/ KernelTests/ KernelTestBase.php, line 1096
Class
- KernelTestBase
- Base class for functional integration tests.
Namespace
Drupal\KernelTestsCode
public function __sleep() {
return [];
}