TASK: Reformat to follow CGL
This commit is contained in:
parent
2b41d5f3db
commit
a31595513f
2 changed files with 8 additions and 3 deletions
|
@ -50,7 +50,12 @@ class SettingsValidator extends AbstractValidator
|
||||||
*/
|
*/
|
||||||
protected $supportedOptions = [
|
protected $supportedOptions = [
|
||||||
'name' => ['', 'Set the name of the setting-array to use', 'string', false],
|
'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
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -43,7 +43,7 @@ class SettingsValidatorTest extends FunctionalTestCase
|
||||||
$result = $validator->validate(new TestValidationGroupsDefaultObject());
|
$result = $validator->validate(new TestValidationGroupsDefaultObject());
|
||||||
$this->assertTrue($result->hasErrors(), 'No Errors for validation group "Default"');
|
$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->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());
|
$result = $validator->validate(new TestValidationGroupsCustomObject());
|
||||||
$this->assertTrue($result->hasErrors(), 'No Errors for validation group "Custom"');
|
$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->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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue