annotate vendor/symfony/phpunit-bridge/Tests/ProcessIsolationTest.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 Symfony\Bridge\PhpUnit\Tests;
Chris@0 4
Chris@0 5 use PHPUnit\Framework\TestCase;
Chris@0 6
Chris@0 7 /**
Chris@0 8 * Don't remove this test case, it tests the legacy group.
Chris@0 9 *
Chris@0 10 * @group legacy
Chris@0 11 *
Chris@0 12 * @runTestsInSeparateProcesses
Chris@0 13 */
Chris@0 14 class ProcessIsolationTest extends TestCase
Chris@0 15 {
Chris@0 16 /**
Chris@0 17 * @expectedDeprecation Test abc
Chris@0 18 */
Chris@0 19 public function testIsolation()
Chris@0 20 {
Chris@0 21 @trigger_error('Test abc', E_USER_DEPRECATED);
Chris@0 22 $this->addToAssertionCount(1);
Chris@0 23 }
Chris@0 24
Chris@0 25 public function testCallingOtherErrorHandler()
Chris@0 26 {
Chris@0 27 $class = class_exists('PHPUnit\Framework\Exception') ? 'PHPUnit\Framework\Exception' : 'PHPUnit_Framework_Exception';
Chris@0 28 if (method_exists($this, 'expectException')) {
Chris@0 29 $this->expectException($class);
Chris@0 30 $this->expectExceptionMessage('Test that PHPUnit\'s error handler fires.');
Chris@0 31 } else {
Chris@0 32 $this->setExpectedException($class, 'Test that PHPUnit\'s error handler fires.');
Chris@0 33 }
Chris@0 34
Chris@0 35 trigger_error('Test that PHPUnit\'s error handler fires.', E_USER_WARNING);
Chris@0 36 }
Chris@0 37 }