public function BrowserTestBase::__sleep in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::__sleep()
Prevents serializing any properties.
Browser 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/ Tests/ BrowserTestBase.php, line 596
Class
- BrowserTestBase
- Provides a test case for functional Drupal tests.
Namespace
Drupal\TestsCode
public function __sleep() {
return [];
}