More updates to stop using dev or alpha or beta versions.
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Test / PhpUnitBridgeTest.php
1 <?php
2
3 namespace Drupal\Tests\Core\Test;
4
5 use Drupal\Tests\UnitTestCase;
6 use Drupal\deprecation_test\Deprecation\FixtureDeprecatedClass;
7
8 /**
9  * Test how unit tests interact with deprecation errors.
10  *
11  * @group Test
12  * @group legacy
13  */
14 class PhpUnitBridgeTest extends UnitTestCase {
15
16   /**
17    * @expectedDeprecation Drupal\deprecation_test\Deprecation\FixtureDeprecatedClass is deprecated.
18    */
19   public function testDeprecatedClass() {
20     $deprecated = new FixtureDeprecatedClass();
21     $this->assertEquals('test', $deprecated->testFunction());
22   }
23
24   public function testDeprecatedFunction() {
25     $this->markTestIncomplete('Modules are not loaded for unit tests, so deprecated_test_function() will not be available.');
26     $this->assertEquals('known_return_value', \deprecation_test_function());
27   }
28
29 }