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

Commit

Permalink
Merge branch 'hotfix/ZF-10854' of https://github.com/thomasweidner/zf2
Browse files Browse the repository at this point in the history
…into hotfix/zf-10854
  • Loading branch information
weierophinney committed Jul 13, 2011
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
18 changes: 8 additions & 10 deletions test/ClientTest.php
Expand Up @@ -155,7 +155,7 @@ public function testSuccessfulRpcMethodCallWithParameters()
}

/**
* @see ZF-2090
* @group ZF-2090
*/
public function testSuccessfullyDetectsEmptyArrayParameterAsArray()
{
Expand All @@ -176,9 +176,7 @@ public function testSuccessfullyDetectsEmptyArrayParameterAsArray()
}

/**
* @see ZF-1412
*
* @return void
* @group ZF-1412
*/
public function testSuccessfulRpcMethodCallWithMixedDateParameters()
{
Expand Down Expand Up @@ -647,16 +645,16 @@ public function testCustomHttpClientUserAgentIsNotOverridden()
$this->assertTrue($this->xmlrpcClient->call('method'));
$this->assertSame($expectedUserAgent, $this->httpClient->getHeader('user-agent'));
}

/**
* @group ZF-8478
*/
public function testPythonSimpleXMLRPCServerWithUnsupportedMethodSignatures()
{
$introspector = new Client\ServerIntrospection(
$introspector = new Client\ServerIntrospection(
new TestClient('http://localhost/')
);

$this->setExpectedException('Zend\XmlRpc\Client\Exception\IntrospectException', 'Invalid signature for method "add"');
$signature = $introspector->getMethodSignature('add');
}
Expand Down Expand Up @@ -727,9 +725,9 @@ public function __call($method, $args) {
/** related to ZF-8478 */
class TestClient extends Client {
public function getProxy($namespace = '') {
if (empty($this->_proxyCache[$namespace])) {
$this->_proxyCache[$namespace] = new PythonSimpleXMLRPCServerWithUnsupportedIntrospection($this, $namespace);
}
if (empty($this->_proxyCache[$namespace])) {
$this->_proxyCache[$namespace] = new PythonSimpleXMLRPCServerWithUnsupportedIntrospection($this, $namespace);
}
return parent::getProxy($namespace);
}
}
18 changes: 9 additions & 9 deletions test/ServerTest.php
Expand Up @@ -96,7 +96,7 @@ public function suppressNotFoundWarnings($errno, $errstr)
*/
public function testAddFunction()
{

$this->_server->addFunction('ZendTest\\XmlRpc\\testFunction', 'zsr');

$methods = $this->_server->listMethods();
Expand All @@ -106,13 +106,13 @@ public function testAddFunction()
$this->assertTrue(in_array('zsr.ZendTest\\XmlRpc\\testFunction', $methods));
$this->assertTrue(in_array('zsr.ZendTest\\XmlRpc\\testFunction2', $methods));
}

public function testAddFunctionThrowsExceptionOnInvalidInput()
{
$this->setExpectedException('Zend\XmlRpc\Server\Exception\InvalidArgumentException', 'Unable to attach function; invalid');
$this->_server->addFunction('nosuchfunction');
}

public function testAddFunctionThrowsExceptionOnInvalidArrayInput()
{
//$this->setExpectedException('XXX', 'xxx');
Expand All @@ -124,7 +124,7 @@ public function testAddFunctionThrowsExceptionOnInvalidArrayInput()
'zsr'
);
}

/**
* get/loadFunctions() test
*/
Expand Down Expand Up @@ -446,7 +446,7 @@ public function testLoadFunctionsThrowsExceptionWithBadData()
$this->setExpectedException('Zend\XmlRpc\Server\Exception\InvalidArgumentException', 'Unable to load server definition; must be an array or Zend_Server_Definition, received stdClass');
$this->_server->loadFunctions($o);
}

public function testLoadFunctionsThrowsExceptionsWithBadData2()
{
$this->setExpectedException('Zend\XmlRpc\Server\Exception\InvalidArgumentException', 'Unable to load server definition; must be an array or Zend_Server_Definition, received string');
Expand All @@ -457,11 +457,11 @@ public function testLoadFunctionsThrowsExceptionsWithBadData3()
{
$o = new \stdClass();
$o = array($o);

$this->setExpectedException('Zend\Server\Exception\InvalidArgumentException', 'Invalid method provided');
$this->_server->loadFunctions($o);
}

public function testLoadFunctionsReadsMethodsFromServerDefinitionObjects()
{
$mockedMethod = $this->getMock('Zend\\Server\\Method\\Definition', array(), array(), '', false,
Expand Down Expand Up @@ -494,7 +494,7 @@ public function testSetRequestThrowsExceptionOnBadClassName()
$this->setExpectedException('Zend\XmlRpc\Server\Exception\InvalidArgumentException', 'Invalid request object');
$this->_server->setRequest('ZendTest\\XmlRpc\\TestRequest2');
}

public function testSetRequestThrowsExceptionOnBadObject()
{
$this->setExpectedException('Zend\XmlRpc\Server\Exception\InvalidArgumentException', 'Invalid request object');
Expand Down Expand Up @@ -585,7 +585,7 @@ public function testMulticallReturnsFaultsWithBadData()
}

/**
* @see ZF-2872
* @group ZF-2872
*/
public function testCanMarshalBase64Requests()
{
Expand Down

0 comments on commit a79cdbd

Please sign in to comment.