Skip to content

Commit

Permalink
Fix tests after change of minimum column width
Browse files Browse the repository at this point in the history
  • Loading branch information
carlobeltrame committed Mar 31, 2021
1 parent 84d91bb commit 58a114c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/content-type/eCampColumnLayout/test/StrategyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ public function jsonExamples(): array {
['non-number-like slot', 'invalid', '"01" does not match to ^[1-9][0-9]*$ at #->properties:columns->items[0]:0->properties:slot', ['columns' => [['slot' => '01', 'width' => 12]]]],
['missing column width', 'invalid', 'Required property missing: width, data: {"slot":"1"} at #->properties:columns->items[0]:0', ['columns' => [['slot' => '1']]]],
['invalid column width', 'invalid', 'Integer expected, "12" received at #->properties:columns->items[0]:0->properties:width', ['columns' => [['slot' => '1', 'width' => '12']]]],
['too small column width', 'invalid', 'Value more than 3 expected, 0 received at #->properties:columns->items[0]:0->properties:width', ['columns' => [['slot' => '1', 'width' => 2], ['slot' => '2', 'width' => 10]]]],
['too small column width', 'invalid', 'Value more than 3 expected, 2 received at #->properties:columns->items[0]:0->properties:width', ['columns' => [['slot' => '1', 'width' => 2], ['slot' => '2', 'width' => 10]]]],
['too large column width', 'invalid', 'Value less than 12 expected, 13 received at #->properties:columns->items[0]:0->properties:width', ['columns' => [['slot' => '1', 'width' => 13], ['slot' => '2', 'width' => -1]]]],
['widths don\'t sum to 12', 'invalidWidths', 'Expected column widths to sum to 12, but got a sum of 13', ['columns' => [['slot' => '1', 'width' => 4], ['slot' => '2', 'width' => 6], ['slot' => '2', 'width' => 3]]]],
['default should work', null, null, Strategy::$DEFAULT_JSON_CONFIG],
['1 column should work', null, null, ['columns' => [['slot' => '1', 'width' => 12]]]],
['3 columns should work', null, null, ['columns' => [['slot' => '1', 'width' => 2], ['slot' => '2', 'width' => 7], ['slot' => '3', 'width' => 3]]]],
['non-alphabetic order', null, null, ['columns' => [['slot' => '3', 'width' => 3], ['slot' => '2', 'width' => 7], ['slot' => '1', 'width' => 2]]]],
['3 columns should work', null, null, ['columns' => [['slot' => '1', 'width' => 3], ['slot' => '2', 'width' => 6], ['slot' => '3', 'width' => 3]]]],
['non-alphabetic order', null, null, ['columns' => [['slot' => '3', 'width' => 3], ['slot' => '2', 'width' => 5], ['slot' => '1', 'width' => 4]]]],
['non-standard slot names', null, null, ['columns' => [['slot' => '1', 'width' => 4], ['slot' => '21', 'width' => 4], ['slot' => '300', 'width' => 4]]]],
['orphan children', 'orphanChildContents', 'The following slots still have child contents and should be present in the columns: 1', ['columns' => [['slot' => '2', 'width' => 4], ['slot' => '3', 'width' => 4], ['slot' => '4', 'width' => 4]]]],
];
Expand Down

0 comments on commit 58a114c

Please sign in to comment.