diff --git a/Tests/Unit/ClientFactory/BuzzFactoryTest.php b/Tests/Unit/ClientFactory/BuzzFactoryTest.php index d312d6dc..8e3e0691 100644 --- a/Tests/Unit/ClientFactory/BuzzFactoryTest.php +++ b/Tests/Unit/ClientFactory/BuzzFactoryTest.php @@ -13,7 +13,7 @@ class BuzzFactoryTest extends \PHPUnit_Framework_TestCase { public function testCreateClient() { - $factory = new BuzzFactory($this->getMock(MessageFactory::class)); + $factory = new BuzzFactory($this->getMockBuilder(MessageFactory::class)->getMock()); $client = $factory->createClient(); $this->assertInstanceOf(Client::class, $client); diff --git a/Tests/Unit/ClientFactory/CurlFactoryTest.php b/Tests/Unit/ClientFactory/CurlFactoryTest.php index f3bd18fa..803233ec 100644 --- a/Tests/Unit/ClientFactory/CurlFactoryTest.php +++ b/Tests/Unit/ClientFactory/CurlFactoryTest.php @@ -14,7 +14,10 @@ class CurlFactoryTest extends \PHPUnit_Framework_TestCase { public function testCreateClient() { - $factory = new CurlFactory($this->getMock(MessageFactory::class), $this->getMock(StreamFactory::class)); + $factory = new CurlFactory( + $this->getMockBuilder(MessageFactory::class)->getMock(), + $this->getMockBuilder(StreamFactory::class)->getMock() + ); $client = $factory->createClient(); $this->assertInstanceOf(Client::class, $client); diff --git a/Tests/Unit/ClientFactory/ReactFactoryTest.php b/Tests/Unit/ClientFactory/ReactFactoryTest.php index 9ddd53e8..c9117797 100644 --- a/Tests/Unit/ClientFactory/ReactFactoryTest.php +++ b/Tests/Unit/ClientFactory/ReactFactoryTest.php @@ -13,7 +13,7 @@ class ReactFactoryTest extends \PHPUnit_Framework_TestCase { public function testCreateClient() { - $factory = new ReactFactory($this->getMock(MessageFactory::class)); + $factory = new ReactFactory($this->getMockBuilder(MessageFactory::class)->getMock()); $client = $factory->createClient(); $this->assertInstanceOf(Client::class, $client); diff --git a/Tests/Unit/ClientFactory/SocketFactoryTest.php b/Tests/Unit/ClientFactory/SocketFactoryTest.php index 3caadbf6..613e9a55 100644 --- a/Tests/Unit/ClientFactory/SocketFactoryTest.php +++ b/Tests/Unit/ClientFactory/SocketFactoryTest.php @@ -13,7 +13,7 @@ class SocketFactoryTest extends \PHPUnit_Framework_TestCase { public function testCreateClient() { - $factory = new SocketFactory($this->getMock(MessageFactory::class)); + $factory = new SocketFactory($this->getMockBuilder(MessageFactory::class)->getMock()); $client = $factory->createClient(); $this->assertInstanceOf(Client::class, $client); diff --git a/Tests/Unit/Discovery/ConfiguredClientsStrategyTest.php b/Tests/Unit/Discovery/ConfiguredClientsStrategyTest.php index ecf3dbc7..68de9997 100644 --- a/Tests/Unit/Discovery/ConfiguredClientsStrategyTest.php +++ b/Tests/Unit/Discovery/ConfiguredClientsStrategyTest.php @@ -10,8 +10,8 @@ class ConfiguredClientsStrategyTest extends \PHPUnit_Framework_TestCase { public function testGetCandidates() { - $httpClient = $this->getMock(HttpClient::class); - $httpAsyncClient = $this->getMock(HttpAsyncClient::class); + $httpClient = $this->getMockBuilder(HttpClient::class)->getMock(); + $httpAsyncClient = $this->getMockBuilder(HttpAsyncClient::class)->getMock(); $strategy = new ConfiguredClientsStrategy($httpClient, $httpAsyncClient); $candidates = $strategy::getCandidates(HttpClient::class); @@ -36,7 +36,7 @@ public function testGetCandidatesEmpty() public function testGetCandidatesEmptyAsync() { - $httpClient = $this->getMock(HttpClient::class); + $httpClient = $this->getMockBuilder(HttpClient::class)->getMock(); $strategy = new ConfiguredClientsStrategy($httpClient, null); $candidates = $strategy::getCandidates(HttpClient::class); @@ -49,7 +49,7 @@ public function testGetCandidatesEmptyAsync() public function testGetCandidatesEmptySync() { - $httpAsyncClient = $this->getMock(HttpAsyncClient::class); + $httpAsyncClient = $this->getMockBuilder(HttpAsyncClient::class)->getMock(); $strategy = new ConfiguredClientsStrategy(null, $httpAsyncClient); $candidates = $strategy::getCandidates(HttpClient::class);