8ecb70ca2cf0ed4456e9950eef28bfde20641126
[yaffs-website] / web / core / tests / Drupal / Tests / UnitTestCaseDeprecationTest.php
1 <?php
2
3 namespace Drupal\Tests;
4
5 /**
6  * @coversDefaultClass \Drupal\Tests\UnitTestCase
7  *
8  * @group Test
9  * @group legacy
10  */
11 class UnitTestCaseDeprecationTest extends UnitTestCase {
12
13   /**
14    * @covers ::getBlockMockWithMachineName
15    * @expectedDeprecation Drupal\Tests\UnitTestCase::getBlockMockWithMachineName is deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Unit test base classes should not have dependencies on extensions. Set up mocks in individual tests.
16    */
17   public function testDeprecatedGetBlockMockWithMachineName() {
18     $block_mock = $this->getBlockMockWithMachineName('test_name');
19     $this->assertEquals('test_name', $block_mock->getPlugin()->getMachineNameSuggestion());
20   }
21
22 }