1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 18:13:00 +01:00

[Service] Adding an 'array' type validator

[Tests] Returning the mock plugin created by calling $this->setMockResponse()
This commit is contained in:
Michael Dowling 2012-05-08 17:23:32 -07:00
parent a9f3ad89b4
commit 5ff7456cc0
2 changed files with 6 additions and 1 deletions

View File

@ -67,6 +67,7 @@ class Inspector
'float' => array($base . 'Numeric', null),
'string' => array($base . 'Type', array('type' => 'string')),
'file' => array($base . 'Type', array('type' => 'file')),
'array' => array($base . 'Type', array('type' => 'array')),
'bool' => array($base . 'Bool', null),
'boolean' => array($base . 'Bool', null),
'email' => array($base . 'Email', null),

View File

@ -173,7 +173,9 @@ abstract class GuzzleTestCase extends \PHPUnit_Framework_TestCase
* request sent by the client.
*
* @param Client $client Client object to modify
* @param string $paths Path to files within the Mock folder of the service
* @param string $paths Path to files within the Mock folder of the service
*
* @return MockPlugin returns the created mock plugin
*/
public function setMockResponse(Client $client, $paths)
{
@ -189,6 +191,8 @@ abstract class GuzzleTestCase extends \PHPUnit_Framework_TestCase
}
$client->getEventDispatcher()->addSubscriber($mock);
return $mock;
}
/**