More updates to stop using dev or alpha or beta versions.
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Test / KernelTestBaseTest.php
1 <?php
2
3 namespace Drupal\Tests\Core\Test;
4
5 use Drupal\Tests\UnitTestCase;
6 use Drupal\KernelTests\KernelTestBase;
7
8 /**
9  * @group Test
10  * @group legacy
11  *
12  * @coversDefaultClass \Drupal\KernelTests\KernelTestBase
13  */
14 class KernelTestBaseTest extends UnitTestCase {
15
16   /**
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.
18    *
19    * @covers ::isTestInIsolation
20    */
21   public function testDeprecatedIsTestInIsolation() {
22     $kernel_test = $this->getMockBuilder(KernelTestBase::class)
23       ->disableOriginalConstructor()
24       ->getMockForAbstractClass();
25
26     $is_isolated = new \ReflectionMethod($kernel_test, 'isTestInIsolation');
27     $is_isolated->setAccessible(TRUE);
28
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));
32   }
33
34 }