File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,6 @@ protected function createMock($originalClassName): MockObject
30
30
->disableOriginalClone ()
31
31
->disableArgumentCloning ()
32
32
->disallowMockingUnknownTypes ()
33
- ->getMock ();
33
+ ->getMock ();
34
34
}
35
35
}
Original file line number Diff line number Diff line change 3
3
namespace Symfony \Bridge \PhpUnit \Tests ;
4
4
5
5
use PHPUnit \Framework \TestCase ;
6
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
6
7
7
8
/**
8
9
* Don't remove this test case, it tests the legacy group.
13
14
*/
14
15
class ProcessIsolationTest extends TestCase
15
16
{
17
+ use ForwardCompatTestTrait;
18
+
16
19
/**
17
20
* @expectedDeprecation Test abc
18
21
*/
@@ -25,12 +28,8 @@ public function testIsolation()
25
28
public function testCallingOtherErrorHandler ()
26
29
{
27
30
$ 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
- }
31
+ $ this ->expectException ($ class );
32
+ $ this ->expectExceptionMessage ('Test that PHPUnit \'s error handler fires. ' );
34
33
35
34
trigger_error ('Test that PHPUnit \'s error handler fires. ' , E_USER_WARNING );
36
35
}
You can’t perform that action at this time.
0 commit comments