3 namespace Drupal\Tests\Core\Test;
5 use Drupal\Tests\UnitTestCase;
6 use Drupal\KernelTests\KernelTestBase;
12 * @coversDefaultClass \Drupal\KernelTests\KernelTestBase
14 class KernelTestBaseTest extends UnitTestCase {
17 * @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.
19 * @covers ::isTestInIsolation
21 public function testDeprecatedIsTestInIsolation() {
22 $kernel_test = $this->getMockBuilder(KernelTestBase::class)
23 ->disableOriginalConstructor()
24 ->getMockForAbstractClass();
26 $is_isolated = new \ReflectionMethod($kernel_test, 'isTestInIsolation');
27 $is_isolated->setAccessible(TRUE);
29 // Assert that the return value is a bool, because this unit test might or
30 // might not be running in process isolation.
31 $this->assertInternalType('bool', $is_isolated->invoke($kernel_test));