comparison vendor/symfony/phpunit-bridge/Tests/ProcessIsolationTest.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents
children
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
1 <?php
2
3 namespace Symfony\Bridge\PhpUnit\Tests;
4
5 use PHPUnit\Framework\TestCase;
6
7 /**
8 * Don't remove this test case, it tests the legacy group.
9 *
10 * @group legacy
11 *
12 * @runTestsInSeparateProcesses
13 */
14 class ProcessIsolationTest extends TestCase
15 {
16 /**
17 * @expectedDeprecation Test abc
18 */
19 public function testIsolation()
20 {
21 @trigger_error('Test abc', E_USER_DEPRECATED);
22 $this->addToAssertionCount(1);
23 }
24
25 public function testCallingOtherErrorHandler()
26 {
27 $class = class_exists('PHPUnit\Framework\Exception') ? 'PHPUnit\Framework\Exception' : 'PHPUnit_Framework_Exception';
28 if (method_exists($this, 'expectException')) {
29 $this->expectException($class);
30 $this->expectExceptionMessage('Test that PHPUnit\'s error handler fires.');
31 } else {
32 $this->setExpectedException($class, 'Test that PHPUnit\'s error handler fires.');
33 }
34
35 trigger_error('Test that PHPUnit\'s error handler fires.', E_USER_WARNING);
36 }
37 }