annotate core/tests/Drupal/Tests/UnitTestCaseDeprecationTest.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\Tests;
Chris@0 4
Chris@0 5 /**
Chris@0 6 * @coversDefaultClass \Drupal\Tests\UnitTestCase
Chris@0 7 *
Chris@0 8 * @group Test
Chris@0 9 * @group legacy
Chris@0 10 */
Chris@0 11 class UnitTestCaseDeprecationTest extends UnitTestCase {
Chris@0 12
Chris@0 13 /**
Chris@0 14 * @covers ::getBlockMockWithMachineName
Chris@0 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@0 16 */
Chris@0 17 public function testDeprecatedGetBlockMockWithMachineName() {
Chris@0 18 $block_mock = $this->getBlockMockWithMachineName('test_name');
Chris@0 19 $this->assertEquals('test_name', $block_mock->getPlugin()->getMachineNameSuggestion());
Chris@0 20 }
Chris@0 21
Chris@0 22 }