Mercurial > hg > isophonics-drupal-site
annotate vendor/symfony/phpunit-bridge/Tests/ProcessIsolationTest.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 1fec387a4317 |
children |
rev | line source |
---|---|
Chris@14 | 1 <?php |
Chris@14 | 2 |
Chris@14 | 3 namespace Symfony\Bridge\PhpUnit\Tests; |
Chris@14 | 4 |
Chris@14 | 5 use PHPUnit\Framework\TestCase; |
Chris@14 | 6 |
Chris@14 | 7 /** |
Chris@14 | 8 * Don't remove this test case, it tests the legacy group. |
Chris@14 | 9 * |
Chris@14 | 10 * @group legacy |
Chris@14 | 11 * |
Chris@14 | 12 * @runTestsInSeparateProcesses |
Chris@14 | 13 */ |
Chris@14 | 14 class ProcessIsolationTest extends TestCase |
Chris@14 | 15 { |
Chris@14 | 16 /** |
Chris@14 | 17 * @expectedDeprecation Test abc |
Chris@14 | 18 */ |
Chris@14 | 19 public function testIsolation() |
Chris@14 | 20 { |
Chris@14 | 21 @trigger_error('Test abc', E_USER_DEPRECATED); |
Chris@14 | 22 $this->addToAssertionCount(1); |
Chris@14 | 23 } |
Chris@14 | 24 |
Chris@14 | 25 public function testCallingOtherErrorHandler() |
Chris@14 | 26 { |
Chris@14 | 27 $class = class_exists('PHPUnit\Framework\Exception') ? 'PHPUnit\Framework\Exception' : 'PHPUnit_Framework_Exception'; |
Chris@14 | 28 if (method_exists($this, 'expectException')) { |
Chris@14 | 29 $this->expectException($class); |
Chris@14 | 30 $this->expectExceptionMessage('Test that PHPUnit\'s error handler fires.'); |
Chris@14 | 31 } else { |
Chris@14 | 32 $this->setExpectedException($class, 'Test that PHPUnit\'s error handler fires.'); |
Chris@14 | 33 } |
Chris@14 | 34 |
Chris@14 | 35 trigger_error('Test that PHPUnit\'s error handler fires.', E_USER_WARNING); |
Chris@14 | 36 } |
Chris@14 | 37 } |