Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into hotfix/ZF-3821
Browse files Browse the repository at this point in the history
Conflicts:
	tests/Zend/InfoCard/XmlParsingTest.php
  • Loading branch information
Pádraic Brady committed Aug 26, 2011
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
11 changes: 5 additions & 6 deletions test/ClientTest.php
Expand Up @@ -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());
}

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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());
}

Expand Down
2 changes: 1 addition & 1 deletion test/ResponseTest.php
Expand Up @@ -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());
}

/**
Expand Down
6 changes: 3 additions & 3 deletions test/ServerTest.php
Expand Up @@ -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,
Expand All @@ -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());
}

Expand Down Expand Up @@ -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());
}
Expand Down
2 changes: 1 addition & 1 deletion test/ValueTest.php
Expand Up @@ -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)
Expand Down

0 comments on commit f0829e4

Please sign in to comment.