PHPUnit: Replaced deprecated method getMock() with getMockBuilder()

This commit is contained in:
vladar 2017-01-26 18:48:23 +07:00
parent fa9611738d
commit b4e6630c1d

View File

@ -509,7 +509,11 @@ class ServerTest extends \PHPUnit_Framework_TestCase
public function testHandleRequest()
{
$mock = $this->getMock('GraphQL\Server', ['readInput', 'produceOutput']);
$mock = $this->getMockBuilder('GraphQL\Server')
->setMethods(['readInput', 'produceOutput'])
->getMock()
;
$mock->method('readInput')
->will($this->returnValue(json_encode(['query' => '{err}'])));