function KernelTestBase::sharesEnvironment
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::sharesEnvironment()
Returns whether this test class shares its environment between its methods.
Return value
bool TRUE if the test methods of this class share one environment.
See also
\Drupal\TestTools\Attribute\ShareEnvironment
File
-
core/
tests/ Drupal/ KernelTests/ KernelTestBase.php, line 292
Class
- KernelTestBase
- Base class for functional integration tests.
Namespace
Drupal\KernelTestsCode
protected static function sharesEnvironment() : bool {
// The attribute is deliberately not inherited: every test class declares
// for itself, as it already does for the PHPUnit attributes.
return ShareEnvironment::isEnabledFor(static::class);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.