mirror of
https://github.com/opdavies/build-configs.git
synced 2025-03-13 05:26:56 +00:00
test: language should be a supported language
This commit is contained in:
parent
f25395d877
commit
e223181ab7
|
@ -21,3 +21,20 @@ test('The project name should be a string', function (mixed $projectName, int $e
|
|||
yield 'True' => [true, 1];
|
||||
yield 'False' => [false, 2];
|
||||
});
|
||||
|
||||
test('The project language should be a supported language', function (mixed $language, int $expectedViolationCount) {
|
||||
$configuration = [
|
||||
'language' => $language,
|
||||
];
|
||||
|
||||
expect($this->validator->validate($configuration))
|
||||
->toHaveCount($expectedViolationCount);
|
||||
})->with(function () {
|
||||
yield 'Supported language string' => ['php', 0];
|
||||
yield 'Non-supported language string' => ['not-supported', 1];
|
||||
yield 'Empty string' => ['', 1];
|
||||
yield 'Integer' => [1, 2];
|
||||
yield 'Null' => [null, 1];
|
||||
yield 'True' => [true, 2];
|
||||
yield 'False' => [false, 2];
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue