annotate core/tests/Drupal/Tests/UnitTestCaseDeprecationTest.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 1fec387a4317
children
rev   line source
Chris@14 1 <?php
Chris@14 2
Chris@14 3 namespace Drupal\Tests;
Chris@14 4
Chris@14 5 /**
Chris@14 6 * @coversDefaultClass \Drupal\Tests\UnitTestCase
Chris@14 7 *
Chris@14 8 * @group Test
Chris@14 9 * @group legacy
Chris@14 10 */
Chris@14 11 class UnitTestCaseDeprecationTest extends UnitTestCase {
Chris@14 12
Chris@14 13 /**
Chris@14 14 * @covers ::getBlockMockWithMachineName
Chris@14 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.
Chris@14 16 */
Chris@14 17 public function testDeprecatedGetBlockMockWithMachineName() {
Chris@14 18 $block_mock = $this->getBlockMockWithMachineName('test_name');
Chris@14 19 $this->assertEquals('test_name', $block_mock->getPlugin()->getMachineNameSuggestion());
Chris@14 20 }
Chris@14 21
Chris@14 22 }