Add test and adjust PHP function arguments
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
92e5fb4053
commit
9305094b8b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue