2
2
3
3
namespace phpmock \phpunit ;
4
4
5
- use \PHPUnit_Framework_MockObject_Builder_InvocationMocker as InvocationMocker ;
6
5
use PHPUnit \Framework \TestCase ;
7
6
use phpmock \integration \MockDelegateFunctionBuilder ;
7
+ use PHPUnit \Framework \MockObject \Builder \InvocationMocker ;
8
+ use PHPUnit \Framework \MockObject \Matcher \Invocation ;
9
+ use PHPUnit \Framework \MockObject \MockObject ;
8
10
9
11
/**
10
12
* Tests MockObjectProxyTest.
@@ -25,13 +27,13 @@ class MockObjectProxyTest extends TestCase
25
27
*/
26
28
public function testExpects ()
27
29
{
28
- $ matcher = $ this ->getMockBuilder (\PHPUnit_Framework_MockObject_Matcher_Invocation ::class)->getMock ();
30
+ $ matcher = $ this ->getMockBuilder (Invocation ::class)->getMock ();
29
31
30
32
$ invocationMocker = $ this ->getMockBuilder (InvocationMocker::class)->disableOriginalConstructor ()->getMock ();
31
33
$ invocationMocker ->expects ($ this ->once ())->method ("method " )
32
34
->with (MockDelegateFunctionBuilder::METHOD )->willReturn ($ invocationMocker );
33
35
34
- $ prophecy = $ this ->prophesize (\PHPUnit_Framework_MockObject_MockObject ::class);
36
+ $ prophecy = $ this ->prophesize (MockObject ::class);
35
37
$ prophecy ->expects ($ matcher )->willReturn ($ invocationMocker );
36
38
$ mock = $ prophecy ->reveal ();
37
39
@@ -53,7 +55,7 @@ public function testExpects()
53
55
*/
54
56
public function testHasMatcher ()
55
57
{
56
- $ prophecy = $ this ->prophesize (\PHPUnit_Framework_MockObject_MockObject ::class);
58
+ $ prophecy = $ this ->prophesize (MockObject ::class);
57
59
$ prophecy ->__phpunit_hasMatchers ()->willReturn ("foo " );
58
60
$ mock = $ prophecy ->reveal ();
59
61
@@ -74,7 +76,7 @@ public function testHasMatcher()
74
76
*/
75
77
public function testProxiedMethods ($ method , array $ arguments = [], $ expected = "foo " )
76
78
{
77
- $ prophecy = $ this ->prophesize (\PHPUnit_Framework_MockObject_MockObject ::class);
79
+ $ prophecy = $ this ->prophesize (MockObject ::class);
78
80
call_user_func_array ([$ prophecy , $ method ], $ arguments )->willReturn ($ expected );
79
81
$ mock = $ prophecy ->reveal ();
80
82
0 commit comments