summaryrefslogtreecommitdiffstats
path: root/tests/lib/appframework/utility/ControllerMethodReflectorTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-13 10:40:49 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-13 10:40:49 +0200
commita152e320f6aa98774950eb088588cd16387226f8 (patch)
tree4af5190252e9229dd90c84213fcad07950f65822 /tests/lib/appframework/utility/ControllerMethodReflectorTest.php
parentc06063255f8d93b32452e19819f39cb53d5d4ae3 (diff)
downloadnextcloud-server-a152e320f6aa98774950eb088588cd16387226f8.tar.gz
nextcloud-server-a152e320f6aa98774950eb088588cd16387226f8.zip
make it possible to omit parameters and use the default parameters from the controller method
Diffstat (limited to 'tests/lib/appframework/utility/ControllerMethodReflectorTest.php')
-rw-r--r--tests/lib/appframework/utility/ControllerMethodReflectorTest.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/appframework/utility/ControllerMethodReflectorTest.php b/tests/lib/appframework/utility/ControllerMethodReflectorTest.php
index cccc7688884..8939a203edb 100644
--- a/tests/lib/appframework/utility/ControllerMethodReflectorTest.php
+++ b/tests/lib/appframework/utility/ControllerMethodReflectorTest.php
@@ -88,7 +88,7 @@ class ControllerMethodReflectorTest extends \PHPUnit_Framework_TestCase {
}
- public function arguments($arg, $arg2) {}
+ public function arguments($arg, $arg2='hi') {}
public function testReflectParameters() {
$reader = new ControllerMethodReflector();
$reader->reflect(
@@ -96,7 +96,7 @@ class ControllerMethodReflectorTest extends \PHPUnit_Framework_TestCase {
'arguments'
);
- $this->assertEquals(array('arg', 'arg2'), $reader->getParameters());
+ $this->assertEquals(array('arg' => null, 'arg2' => 'hi'), $reader->getParameters());
}
@@ -108,7 +108,7 @@ class ControllerMethodReflectorTest extends \PHPUnit_Framework_TestCase {
'arguments2'
);
- $this->assertEquals(array('arg',), $reader->getParameters());
+ $this->assertEquals(array('arg' => null), $reader->getParameters());
}