Update JsonRPC library

This commit is contained in:
Frédéric Guillot 2014-10-25 09:48:49 -04:00
parent c28c46b8ba
commit c48cb658ff
2 changed files with 8 additions and 2 deletions

View File

@ -164,7 +164,8 @@ class Api extends PHPUnit_Framework_TestCase
'column_id' => 2,
);
$this->assertTrue($this->client->execute('createTask', $task));
//$this->assertTrue($this->client->execute('createTask', $task));
$this->assertTrue($this->client->createTask($task));
}
/**

View File

@ -88,8 +88,13 @@ class Client
* @param array $params Procedure arguments
* @return mixed
*/
public function __call($method, $params)
public function __call($method, array $params)
{
// Allow to pass an array and use named arguments
if (count($params) === 1 && is_array($params[0])) {
$params = $params[0];
}
return $this->execute($method, $params);
}