Browse Source

Add test and adjust PHP function arguments

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
tags/v11.0RC2
Lukas Reschke 7 years ago
parent
commit
9305094b8b
No account linked to committer's email address

+ 1
- 1
lib/private/RichObjectStrings/Validator.php View File

@@ -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];
}

+ 9
- 0
tests/lib/RichObjectStrings/DefinitionsTest.php View File

@@ -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…
Cancel
Save