Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / tests / Drupal / Tests / UnitTestCaseDeprecationTest.php
diff --git a/web/core/tests/Drupal/Tests/UnitTestCaseDeprecationTest.php b/web/core/tests/Drupal/Tests/UnitTestCaseDeprecationTest.php
new file mode 100644 (file)
index 0000000..8ecb70c
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+namespace Drupal\Tests;
+
+/**
+ * @coversDefaultClass \Drupal\Tests\UnitTestCase
+ *
+ * @group Test
+ * @group legacy
+ */
+class UnitTestCaseDeprecationTest extends UnitTestCase {
+
+  /**
+   * @covers ::getBlockMockWithMachineName
+   * @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.
+   */
+  public function testDeprecatedGetBlockMockWithMachineName() {
+    $block_mock = $this->getBlockMockWithMachineName('test_name');
+    $this->assertEquals('test_name', $block_mock->getPlugin()->getMachineNameSuggestion());
+  }
+
+}