Mercurial > hg > cmmr2012-drupal-site
annotate core/tests/Drupal/Tests/ExpectDeprecationTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\Tests; |
Chris@0 | 4 |
Chris@0 | 5 use Drupal\Tests\Traits\ExpectDeprecationTrait; |
Chris@0 | 6 |
Chris@0 | 7 /** |
Chris@0 | 8 * @coversDefaultClass \Drupal\Tests\Traits\ExpectDeprecationTrait |
Chris@0 | 9 * |
Chris@0 | 10 * @group Test |
Chris@0 | 11 * @group legacy |
Chris@0 | 12 */ |
Chris@0 | 13 class ExpectDeprecationTest extends UnitTestCase { |
Chris@0 | 14 use ExpectDeprecationTrait; |
Chris@0 | 15 |
Chris@0 | 16 /** |
Chris@0 | 17 * @covers ::expectDeprecation |
Chris@0 | 18 */ |
Chris@0 | 19 public function testExpectDeprecation() { |
Chris@0 | 20 $this->expectDeprecation('Test deprecation'); |
Chris@0 | 21 @trigger_error('Test deprecation', E_USER_DEPRECATED); |
Chris@0 | 22 } |
Chris@0 | 23 |
Chris@0 | 24 /** |
Chris@0 | 25 * @covers ::expectDeprecation |
Chris@0 | 26 * @runInSeparateProcess |
Chris@0 | 27 * @preserveGlobalState disabled |
Chris@0 | 28 */ |
Chris@0 | 29 public function testExpectDeprecationInIsolation() { |
Chris@0 | 30 $this->expectDeprecation('Test isolated deprecation'); |
Chris@0 | 31 $this->expectDeprecation('Test isolated deprecation2'); |
Chris@0 | 32 @trigger_error('Test isolated deprecation', E_USER_DEPRECATED); |
Chris@0 | 33 @trigger_error('Test isolated deprecation2', E_USER_DEPRECATED); |
Chris@0 | 34 } |
Chris@0 | 35 |
Chris@0 | 36 } |