Mercurial > hg > cmmr2012-drupal-site
comparison core/tests/Drupal/Tests/ExpectDeprecationTest.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Tests; | |
4 | |
5 use Drupal\Tests\Traits\ExpectDeprecationTrait; | |
6 | |
7 /** | |
8 * @coversDefaultClass \Drupal\Tests\Traits\ExpectDeprecationTrait | |
9 * | |
10 * @group Test | |
11 * @group legacy | |
12 */ | |
13 class ExpectDeprecationTest extends UnitTestCase { | |
14 use ExpectDeprecationTrait; | |
15 | |
16 /** | |
17 * @covers ::expectDeprecation | |
18 */ | |
19 public function testExpectDeprecation() { | |
20 $this->expectDeprecation('Test deprecation'); | |
21 @trigger_error('Test deprecation', E_USER_DEPRECATED); | |
22 } | |
23 | |
24 /** | |
25 * @covers ::expectDeprecation | |
26 * @runInSeparateProcess | |
27 * @preserveGlobalState disabled | |
28 */ | |
29 public function testExpectDeprecationInIsolation() { | |
30 $this->expectDeprecation('Test isolated deprecation'); | |
31 $this->expectDeprecation('Test isolated deprecation2'); | |
32 @trigger_error('Test isolated deprecation', E_USER_DEPRECATED); | |
33 @trigger_error('Test isolated deprecation2', E_USER_DEPRECATED); | |
34 } | |
35 | |
36 } |