summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/functionals/ApiTest.php3
-rw-r--r--vendor/JsonRPC/Client.php7
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/functionals/ApiTest.php b/tests/functionals/ApiTest.php
index da5aeaee..f6e21b55 100644
--- a/tests/functionals/ApiTest.php
+++ b/tests/functionals/ApiTest.php
@@ -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));
}
/**
diff --git a/vendor/JsonRPC/Client.php b/vendor/JsonRPC/Client.php
index 65aed223..d9c785ed 100644
--- a/vendor/JsonRPC/Client.php
+++ b/vendor/JsonRPC/Client.php
@@ -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);
}