comparison core/tests/Drupal/Tests/UnitTestCaseDeprecationTest.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents
children
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
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 }