summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/appframework/utility/ControllerMethodReflectorTest.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lib/appframework/utility/ControllerMethodReflectorTest.php b/tests/lib/appframework/utility/ControllerMethodReflectorTest.php
index a584b5481ba..38bd537e073 100644
--- a/tests/lib/appframework/utility/ControllerMethodReflectorTest.php
+++ b/tests/lib/appframework/utility/ControllerMethodReflectorTest.php
@@ -104,6 +104,25 @@ class ControllerMethodReflectorTest extends \Test\TestCase {
$this->assertEquals('int', $reader->getType('test'));
}
+ /**
+ * @Annotation
+ * @param int $a
+ * @param int $b
+ * @requires PHP 7
+ */
+ public function testReadTypeIntAnnotationsScalarTypes($a, float $b, int $c, $d){
+ $reader = new ControllerMethodReflector();
+ $reader->reflect(
+ '\OC\AppFramework\Utility\ControllerMethodReflectorTest',
+ 'testReadTypeIntAnnotationsScalarTypes'
+ );
+
+ $this->assertEquals('int', $reader->getType('a'));
+ $this->assertEquals('float', $reader->getType('b'));
+ $this->assertEquals('int', $reader->getType('c'));
+ $this->assertNull($reader->getType('d'));
+ }
+
/**
* @Annotation