@@ -29,17 +29,17 @@ class ClientTest extends JosserTestCase
2929 public function testRequest ($ requestMethod , $ requestParameters , $ responseResult )
3030 {
3131 /* @var $transport \Josser\Client\Transport\TransportInterface */
32- $ transport = $ this ->getMock ( ' Josser\ Client\Transport\TransportInterface' );
32+ $ transport = $ this ->getMockBuilder ( Client \Transport \TransportInterface::class)-> getMockForAbstractClass ( );
3333 /* @var $protocol \Josser\Protocol\Protocol */
34- $ protocol = $ this ->getMock ( ' Josser\ Client\Protocol\Protocol' );
34+ $ protocol = $ this ->getMockBuilder ( Client \Protocol \Protocol::class)-> getMockForAbstractClass ( );
3535 /* @var $response \Josser\Client\Response\ResponseInterface */
36- $ response = $ this ->getMock ( ' Josser\ Client\Response\ResponseInterface' );
36+ $ response = $ this ->getMockBuilder ( Client \Response \ResponseInterface::class)-> getMockForAbstractClass ( );
3737 $ response ->expects ($ this ->any ())
3838 ->method ('getResult ' )
3939 ->will ($ this ->returnValue ($ responseResult ));
4040
4141 /* @var $client \Josser\Client */
42- $ client = $ this ->getMock ( ' Josser\ Client' , array ( ' call ' ), array ( $ transport , $ protocol) );
42+ $ client = $ this ->getMockBuilder ( Client::class)-> setConstructorArgs ([ $ transport , $ protocol])-> setMethods ([ ' call ' ])-> getMock ( );
4343 $ client ->expects ($ this ->once ())
4444 ->method ('call ' )
4545 ->with (
@@ -64,17 +64,17 @@ public function testRequest($requestMethod, $requestParameters, $responseResult)
6464 public function testNotify ($ requestMethod , $ requestParameters , $ responseResult )
6565 {
6666 /* @var $transport \Josser\Client\Transport\TransportInterface */
67- $ transport = $ this ->getMock ( ' Josser\ Client\Transport\TransportInterface' );
67+ $ transport = $ this ->getMockBuilder ( Client \Transport \TransportInterface::class)-> getMockForAbstractClass ( );
6868 /* @var $protocol \Josser\Protocol\Protocol */
69- $ protocol = $ this ->getMock ( ' Josser\ Client\Protocol\Protocol' );
69+ $ protocol = $ this ->getMockBuilder ( Client \Protocol \Protocol::class)-> getMockForAbstractClass ( );
7070 /* @var $response \Josser\Client\Response\ResponseInterface */
71- $ response = $ this ->getMock ( ' Josser\ Client\Response\ResponseInterface' );
71+ $ response = $ this ->getMockBuilder ( Client \Response \ResponseInterface::class)-> getMockForAbstractClass ( );
7272 $ response ->expects ($ this ->any ())
7373 ->method ('getResult ' )
7474 ->will ($ this ->returnValue ($ responseResult ));
7575
7676 /* @var $client \Josser\Client */
77- $ client = $ this ->getMock ( ' Josser\ Client' , array ( ' call ' ), array ( $ transport , $ protocol) );
77+ $ client = $ this ->getMockBuilder ( Client::class)-> setConstructorArgs ([ $ transport , $ protocol])-> setMethods ([ ' call ' ])-> getMock ( );
7878 $ client ->expects ($ this ->once ())
7979 ->method ('call ' )
8080 ->with (
@@ -103,4 +103,4 @@ public function requestAndNotificationDataProvider()
103103 array ('divide ' , array (3 , 2 ), 1.5 ),
104104 );
105105 }
106- }
106+ }
0 commit comments