Signed-off-by: Lukas Reschke <lukas@statuscode.ch>tags/v11.0RC2
@@ -97,7 +97,7 @@ class Validator implements IValidator { | |||
* @param array $definition | |||
* @return string[] | |||
*/ | |||
protected function getRequiredParameters($type, $definition) { | |||
protected function getRequiredParameters($type, array $definition) { | |||
if (isset($this->requiredParameters[$type])) { | |||
return $this->requiredParameters[$type]; | |||
} |
@@ -36,6 +36,15 @@ class DefinitionsTest extends TestCase { | |||
return $testsuite; | |||
} | |||
/** | |||
* @expectedException \OCP\RichObjectStrings\InvalidObjectExeption | |||
* @expectedExceptionMessage Object type is undefined | |||
*/ | |||
public function testGetDefinitionNotExisting() { | |||
$definitions = new Definitions(); | |||
$definitions->getDefinition('NotExistingType'); | |||
} | |||
/** | |||
* @dataProvider dataGetDefinition | |||
* @param string $type |