Skip to content

Commit e6ce7a1

Browse files
committed
Move loop after complex tests definition
1 parent 91f4498 commit e6ce7a1

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

tests/Constraints/CoerciveTest.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,6 @@ public function dataCoerceCases()
8080
),
8181
);
8282

83-
$tests = array();
84-
foreach ($types as $toType => $testCases) {
85-
foreach ($testCases as $testCase) {
86-
$tests[] = array(
87-
sprintf('{"properties":{"propertyOne":{"type":"%s"}}}', strtolower($toType)),
88-
sprintf('{"propertyOne":%s}', $testCase[1]),
89-
$testCase[0],
90-
$toType,
91-
$testCase[2],
92-
$testCase[3]
93-
);
94-
}
95-
}
96-
9783
// #38 check post-coercion validation (to array)
9884
$tests[] = array(
9985
'{"properties":{"propertyOne":{"type":"array","items":[{"type":"number"}]}}}',
@@ -150,6 +136,20 @@ public function dataCoerceCases()
150136
'string', 'integer', 42, true
151137
);
152138

139+
$tests = array();
140+
foreach ($types as $toType => $testCases) {
141+
foreach ($testCases as $testCase) {
142+
$tests[] = array(
143+
sprintf('{"properties":{"propertyOne":{"type":"%s"}}}', strtolower($toType)),
144+
sprintf('{"propertyOne":%s}', $testCase[1]),
145+
$testCase[0],
146+
$toType,
147+
$testCase[2],
148+
$testCase[3]
149+
);
150+
}
151+
}
152+
153153
return $tests;
154154
}
155155

0 commit comments

Comments
 (0)