public function KernelTestBaseTest::testDeprecatedIsTestInIsolation in Drupal 8
@expectedDeprecation Drupal\KernelTests\KernelTestBase::isTestInIsolation() is deprecated in Drupal 8.4.x, for removal before the Drupal 9.0.0 release. KernelTestBase tests are always run in isolated processes.
@covers ::isTestInIsolation
File
- core/
tests/ Drupal/ Tests/ Core/ Test/ KernelTestBaseTest.php, line 21
Class
- KernelTestBaseTest
- @group Test @group legacy
Namespace
Drupal\Tests\Core\TestCode
public function testDeprecatedIsTestInIsolation() {
$kernel_test = $this
->getMockBuilder(KernelTestBase::class)
->disableOriginalConstructor()
->getMockForAbstractClass();
$is_isolated = new \ReflectionMethod($kernel_test, 'isTestInIsolation');
$is_isolated
->setAccessible(TRUE);
// Assert that the return value is a bool, because this unit test might or
// might not be running in process isolation.
$this
->assertInternalType('bool', $is_isolated
->invoke($kernel_test));
}