X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FTests%2FExpectDeprecationTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FTests%2FExpectDeprecationTest.php;h=aefb6a0ad927c37d74b5f1c92ecb49541b388480;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/tests/Drupal/Tests/ExpectDeprecationTest.php b/web/core/tests/Drupal/Tests/ExpectDeprecationTest.php new file mode 100644 index 000000000..aefb6a0ad --- /dev/null +++ b/web/core/tests/Drupal/Tests/ExpectDeprecationTest.php @@ -0,0 +1,36 @@ +expectDeprecation('Test deprecation'); + @trigger_error('Test deprecation', E_USER_DEPRECATED); + } + + /** + * @covers ::expectDeprecation + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testExpectDeprecationInIsolation() { + $this->expectDeprecation('Test isolated deprecation'); + $this->expectDeprecation('Test isolated deprecation2'); + @trigger_error('Test isolated deprecation', E_USER_DEPRECATED); + @trigger_error('Test isolated deprecation2', E_USER_DEPRECATED); + } + +}