TASK: Reformat to follow CGL

This commit is contained in:
Daniel Siepmann 2017-07-19 12:55:31 +02:00
parent 2b41d5f3db
commit a31595513f
No known key found for this signature in database
GPG key ID: 33D6629915560EF4
2 changed files with 8 additions and 3 deletions

View file

@ -50,7 +50,12 @@ class SettingsValidator extends AbstractValidator
*/
protected $supportedOptions = [
'name' => ['', 'Set the name of the setting-array to use', 'string', false],
'validationGroups' => [['Default'], 'Same as "Validation Groups" of Flow Framework.', 'array', false],
'validationGroups' => [
['Default'],
'Same as "Validation Groups" of Flow Framework. Defines the groups to execute.',
'array',
false
],
];
/**

View file

@ -43,7 +43,7 @@ class SettingsValidatorTest extends FunctionalTestCase
$result = $validator->validate(new TestValidationGroupsDefaultObject());
$this->assertTrue($result->hasErrors(), 'No Errors for validation group "Default"');
$this->assertCount(1, $result->getFlattenedErrors(), 'Got a non expected number of errors for group "Default"');
$this->assertCount(1, $result->forProperty('shouldBeTrue')->getErrors(), 'Got no error for shouldBeTrue property');
$this->assertCount(1, $result->forProperty('shouldBeTrue')->getErrors(), 'Got no error for property');
}
/**
@ -55,6 +55,6 @@ class SettingsValidatorTest extends FunctionalTestCase
$result = $validator->validate(new TestValidationGroupsCustomObject());
$this->assertTrue($result->hasErrors(), 'No Errors for validation group "Custom"');
$this->assertCount(1, $result->getFlattenedErrors(), 'Got a non expected number of errors for group "Custom"');
$this->assertCount(1, $result->forProperty('shouldBeFalse')->getErrors(), 'Got no error for shouldBeFalse property');
$this->assertCount(1, $result->forProperty('shouldBeFalse')->getErrors(), 'Got no error for property');
}
}