diff --git a/test/ClientTest.php b/test/ClientTest.php index ac6dd8f..3a2aa8e 100644 --- a/test/ClientTest.php +++ b/test/ClientTest.php @@ -73,7 +73,7 @@ public function testGettingDefaultHttpClient() { $xmlrpcClient = new Client('http://foo'); $httpClient = $xmlrpcClient->getHttpClient(); - $this->assertType('Zend\\Http\\Client', $httpClient); + $this->assertInstanceOf('Zend\\Http\\Client', $httpClient); $this->assertSame($httpClient, $xmlrpcClient->getHttpClient()); } @@ -107,8 +107,8 @@ public function testLastRequestAndResponseAreSetAfterRpcMethodCall() $this->setServerResponseTo(true); $this->xmlrpcClient->call('foo'); - $this->assertType('Zend\\XmlRpc\\Request', $this->xmlrpcClient->getLastRequest()); - $this->assertType('Zend\\XmlRpc\\Response', $this->xmlrpcClient->getLastResponse()); + $this->assertInstanceOf('Zend\\XmlRpc\\Request', $this->xmlrpcClient->getLastRequest()); + $this->assertInstanceOf('Zend\\XmlRpc\\Response', $this->xmlrpcClient->getLastResponse()); } public function testSuccessfulRpcMethodCallWithNoParameters() @@ -336,8 +336,7 @@ public function testRpcMethodCallThrowsOnXmlRpcFault() public function testGetProxyReturnsServerProxy() { - $class = 'Zend\\XmlRpc\\Client\\ServerProxy'; - $this->assertType($class, $this->xmlrpcClient->getProxy()); + $this->assertInstanceOf('Zend\\XmlRpc\\Client\\ServerProxy', $this->xmlrpcClient->getProxy()); } public function testRpcMethodCallsThroughServerProxy() @@ -390,7 +389,7 @@ public function testGettingDefaultIntrospector() { $xmlrpcClient = new Client('http://foo'); $introspector = $xmlrpcClient->getIntrospector(); - $this->assertType('Zend\\XmlRpc\\Client\\ServerIntrospection', $introspector); + $this->assertInstanceOf('Zend\\XmlRpc\\Client\\ServerIntrospection', $introspector); $this->assertSame($introspector, $xmlrpcClient->getIntrospector()); } diff --git a/test/ResponseTest.php b/test/ResponseTest.php index 8b29f72..50c7596 100644 --- a/test/ResponseTest.php +++ b/test/ResponseTest.php @@ -107,7 +107,7 @@ public function testGetFault() { $this->assertNull($this->_response->getFault()); $this->_response->loadXml('foo'); - $this->assertType('Zend\\XmlRpc\\Fault', $this->_response->getFault()); + $this->assertInstanceOf('Zend\\XmlRpc\\Fault', $this->_response->getFault()); } /** diff --git a/test/ServerTest.php b/test/ServerTest.php index a76cab2..73ec5b2 100644 --- a/test/ServerTest.php +++ b/test/ServerTest.php @@ -163,7 +163,7 @@ public function testSettingClassWithArguments() $request = new Request(); $request->setMethod('test.test4'); $response = $this->_server->handle($request); - $this->assertNotType('Zend\\XmlRpc\\Fault', $response); + $this->assertNotInstanceOf('Zend\\XmlRpc\\Fault', $response); $this->assertSame( array('test1' => 'argv-argument', 'test2' => null, @@ -181,7 +181,7 @@ public function testSettingClassWithArgumentsOnlyPassingToConstructor() $request->setMethod('test.test4'); $request->setParams(array('foo')); $response = $this->_server->handle($request); - $this->assertNotType('Zend\\XmlRpc\\Fault', $response); + $this->assertNotInstanceOf('Zend\\XmlRpc\\Fault', $response); $this->assertSame(array('test1' => 'a1', 'test2' => 'a2', 'arg' => array('foo')), $response->getReturnValue()); } @@ -241,7 +241,7 @@ public function testCallingInvalidMethod() $request = new Request(); $request->setMethod('invalid'); $response = $this->_server->handle($request); - $this->assertType('Zend\\XmlRpc\\Fault', $response); + $this->assertInstanceOf('Zend\\XmlRpc\\Fault', $response); $this->assertSame('Method "invalid" does not exist', $response->getMessage()); $this->assertSame(620, $response->getCode()); } diff --git a/test/ValueTest.php b/test/ValueTest.php index 861a45b..ddbcc9c 100644 --- a/test/ValueTest.php +++ b/test/ValueTest.php @@ -840,7 +840,7 @@ public function assertXmlRpcType($type, $object) $type = 'arrayValue'; } $type = 'Zend\\XmlRpc\\Value\\' . ucfirst($type); - $this->assertType($type, $object); + $this->assertInstanceOf($type, $object); } public function wrapXml($xml)