3 namespace Drupal\Tests;
6 * @coversDefaultClass \Drupal\Tests\UnitTestCase
11 class UnitTestCaseDeprecationTest extends UnitTestCase {
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.
17 public function testDeprecatedGetBlockMockWithMachineName() {
18 $block_mock = $this->getBlockMockWithMachineName('test_name');
19 $this->assertEquals('test_name', $block_mock->getPlugin()->getMachineNameSuggestion());