@@ -25,15 +25,15 @@ |
||
25 | 25 | { |
26 | 26 | return [ |
27 | 27 | // key index parse parseIndex |
28 | - ['Thing', null, 'Thing', null], // no nth in key or index param |
|
29 | - ['1st Thing', null, 'Thing', 0], // 1st in key with no index param |
|
30 | - ['1st Thing', 0, 'Thing', 0], // nth in key with matching index param |
|
31 | - ['2nd Thing', null, 'Thing', 1], // 2nd in key with no index param |
|
32 | - ['3rd Thing', null, 'Thing', 2], // 3rd in key with no index param |
|
33 | - ['4th Thing', null, 'Thing', 3], // 3th in key with no index param |
|
34 | - ['478th Thing', null, 'Thing', 477], // high nth in key with no index param |
|
35 | - ['Thing', 0, 'Thing', 0], // no nth in key with 0 index param |
|
36 | - ['Thing', 49, 'Thing', 49], // no nth in key with high index param |
|
28 | + ['Thing', null, 'Thing', null], // no nth in key or index param |
|
29 | + ['1st Thing', null, 'Thing', 0], // 1st in key with no index param |
|
30 | + ['1st Thing', 0, 'Thing', 0], // nth in key with matching index param |
|
31 | + ['2nd Thing', null, 'Thing', 1], // 2nd in key with no index param |
|
32 | + ['3rd Thing', null, 'Thing', 2], // 3rd in key with no index param |
|
33 | + ['4th Thing', null, 'Thing', 3], // 3th in key with no index param |
|
34 | + ['478th Thing', null, 'Thing', 477], // high nth in key with no index param |
|
35 | + ['Thing', 0, 'Thing', 0], // no nth in key with 0 index param |
|
36 | + ['Thing', 49, 'Thing', 49], // no nth in key with high index param |
|
37 | 37 | ]; |
38 | 38 | } |
39 | 39 |
@@ -44,13 +44,13 @@ |
||
44 | 44 | { |
45 | 45 | return [ |
46 | 46 | // key index nth, ordinal, expected result |
47 | - ['Thing', null, null, null, 'Thing'], |
|
48 | - ['Thing', 0, 1, 'st', '1st Thing'], |
|
49 | - ['Thing', 1, 2, 'nd', '2nd Thing'], |
|
50 | - ['Thing', 2, 3, 'rd', '3rd Thing'], |
|
51 | - ['Thing', 3, 4, 'th', '4th Thing'], |
|
52 | - ['Thing', 4, 5, 'th', '5th Thing'], |
|
53 | - ['Thing', 477, 478, 'th', '478th Thing'], |
|
47 | + ['Thing', null, null, null, 'Thing'], |
|
48 | + ['Thing', 0, 1, 'st', '1st Thing'], |
|
49 | + ['Thing', 1, 2, 'nd', '2nd Thing'], |
|
50 | + ['Thing', 2, 3, 'rd', '3rd Thing'], |
|
51 | + ['Thing', 3, 4, 'th', '4th Thing'], |
|
52 | + ['Thing', 4, 5, 'th', '5th Thing'], |
|
53 | + ['Thing', 477, 478, 'th', '478th Thing'], |
|
54 | 54 | ]; |
55 | 55 | } |
56 | 56 | } |
@@ -20,25 +20,25 @@ discard block |
||
20 | 20 | { |
21 | 21 | return [ |
22 | 22 | // nth expected |
23 | - [0, 'th'], |
|
24 | - [1, 'st'], |
|
25 | - [2, 'nd'], |
|
26 | - [3, 'rd'], |
|
27 | - [4, 'th'], |
|
28 | - [5, 'th'], |
|
29 | - [6, 'th'], |
|
30 | - [7, 'th'], |
|
31 | - [8, 'th'], |
|
32 | - [9, 'th'], |
|
33 | - [10, 'th'], |
|
34 | - [11, 'th'], |
|
35 | - [12, 'th'], |
|
36 | - [13, 'th'], |
|
37 | - [14, 'th'], |
|
38 | - [21, 'st'], |
|
39 | - [22, 'nd'], |
|
40 | - [23, 'rd'], |
|
41 | - [24, 'th'], |
|
23 | + [0, 'th'], |
|
24 | + [1, 'st'], |
|
25 | + [2, 'nd'], |
|
26 | + [3, 'rd'], |
|
27 | + [4, 'th'], |
|
28 | + [5, 'th'], |
|
29 | + [6, 'th'], |
|
30 | + [7, 'th'], |
|
31 | + [8, 'th'], |
|
32 | + [9, 'th'], |
|
33 | + [10, 'th'], |
|
34 | + [11, 'th'], |
|
35 | + [12, 'th'], |
|
36 | + [13, 'th'], |
|
37 | + [14, 'th'], |
|
38 | + [21, 'st'], |
|
39 | + [22, 'nd'], |
|
40 | + [23, 'rd'], |
|
41 | + [24, 'th'], |
|
42 | 42 | [101, 'st'], |
43 | 43 | [102, 'nd'], |
44 | 44 | [103, 'rd'], |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | { |
51 | 51 | return [ |
52 | 52 | // nth exception class exception message |
53 | - [-1, InvalidArgumentException::class, '$nth must be a positive number'], |
|
53 | + [-1, InvalidArgumentException::class, '$nth must be a positive number'], |
|
54 | 54 | ]; |
55 | 55 | } |
56 | 56 |
@@ -23,11 +23,11 @@ discard block |
||
23 | 23 | { |
24 | 24 | return [ |
25 | 25 | // key index, parsed key, parsed index, value, |
26 | - ['1st ' . StoreTest::KEY, null, StoreTest::KEY, 0, substr(StoreTest::FIRST_VALUE, 0, 2) ], // key with nth |
|
27 | - ['2nd ' . StoreTest::KEY, null, StoreTest::KEY, 1, substr(StoreTest::SECOND_VALUE, 0, 2) ], // key with nth |
|
28 | - [StoreTest::KEY, 2, StoreTest::KEY, 2, substr(StoreTest::MOST_RECENT_VALUE, 0, 2)], // key without nth |
|
29 | - [StoreTest::KEY, 0, StoreTest::KEY, 0, substr(StoreTest::FIRST_VALUE, 0, 2)], // with index |
|
30 | - [StoreTest::KEY, 1, StoreTest::KEY, 1, substr(StoreTest::SECOND_VALUE, 0, 2)], // with index |
|
26 | + ['1st ' . StoreTest::KEY, null, StoreTest::KEY, 0, substr(StoreTest::FIRST_VALUE, 0, 2)], // key with nth |
|
27 | + ['2nd ' . StoreTest::KEY, null, StoreTest::KEY, 1, substr(StoreTest::SECOND_VALUE, 0, 2)], // key with nth |
|
28 | + [StoreTest::KEY, 2, StoreTest::KEY, 2, substr(StoreTest::MOST_RECENT_VALUE, 0, 2)], // key without nth |
|
29 | + [StoreTest::KEY, 0, StoreTest::KEY, 0, substr(StoreTest::FIRST_VALUE, 0, 2)], // with index |
|
30 | + [StoreTest::KEY, 1, StoreTest::KEY, 1, substr(StoreTest::SECOND_VALUE, 0, 2)], // with index |
|
31 | 31 | ]; |
32 | 32 | } |
33 | 33 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | return [ |
37 | 37 | // key, index, value, exception class, exception message |
38 | - ['1st ' . StoreTest::KEY, 1, null, InvalidArgumentException::class, "1 was provided for index param when key '1st " . StoreTest::KEY . "' contains an nth value, but they do not match"], |
|
38 | + ['1st ' . StoreTest::KEY, 1, null, InvalidArgumentException::class, "1 was provided for index param when key '1st " . StoreTest::KEY . "' contains an nth value, but they do not match"], |
|
39 | 39 | ]; |
40 | 40 | } |
41 | 41 | |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | { |
44 | 44 | return [ |
45 | 45 | // key, index, parsed key, parsed index, value, exception class, exception message |
46 | - ['3rd ' . StoreTest::KEY, null, StoreTest::KEY, 2, null, OutOfBoundsException::class, "Entry '3rd " . StoreTest::KEY . "' was not found in the store." ], |
|
47 | - ['No Such Key', null, StoreTest::KEY, 0, null, OutOfBoundsException::class, "Entry 'No Such Key' was not found in the store." ], |
|
46 | + ['3rd ' . StoreTest::KEY, null, StoreTest::KEY, 2, null, OutOfBoundsException::class, "Entry '3rd " . StoreTest::KEY . "' was not found in the store."], |
|
47 | + ['No Such Key', null, StoreTest::KEY, 0, null, OutOfBoundsException::class, "Entry 'No Such Key' was not found in the store."], |
|
48 | 48 | ]; |
49 | 49 | } |
50 | 50 | |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | { |
53 | 53 | return [ |
54 | 54 | // key, index, parsed key, parsed index, built key, value, exception class, exception message |
55 | - ['1st ' . StoreTest::KEY, null, StoreTest::KEY, 0, '1st ' . StoreTest::KEY, StoreTest::SECOND_VALUE, RuntimeException::class, "Entry '1st " . StoreTest::KEY . "' does not contain '" . StoreTest::SECOND_VALUE . "'" ], |
|
56 | - ['2nd ' . StoreTest::KEY, null, StoreTest::KEY, 1, '2nd ' . StoreTest::KEY, StoreTest::FIRST_VALUE, RuntimeException::class, "Entry '2nd " . StoreTest::KEY . "' does not contain '" . StoreTest::FIRST_VALUE . "'" ], |
|
55 | + ['1st ' . StoreTest::KEY, null, StoreTest::KEY, 0, '1st ' . StoreTest::KEY, StoreTest::SECOND_VALUE, RuntimeException::class, "Entry '1st " . StoreTest::KEY . "' does not contain '" . StoreTest::SECOND_VALUE . "'"], |
|
56 | + ['2nd ' . StoreTest::KEY, null, StoreTest::KEY, 1, '2nd ' . StoreTest::KEY, StoreTest::FIRST_VALUE, RuntimeException::class, "Entry '2nd " . StoreTest::KEY . "' does not contain '" . StoreTest::FIRST_VALUE . "'"], |
|
57 | 57 | ]; |
58 | 58 | } |
59 | 59 |
@@ -23,11 +23,11 @@ discard block |
||
23 | 23 | { |
24 | 24 | return [ |
25 | 25 | // key, index, parsed key, parsed index, value |
26 | - ['1st ' . StoreTest::KEY, null, StoreTest::KEY, 0, StoreTest::FIRST_VALUE ], // key with nth |
|
27 | - ['2nd ' . StoreTest::KEY, null, StoreTest::KEY, 1, StoreTest::SECOND_VALUE ], // key with nth |
|
28 | - [StoreTest::KEY, null, StoreTest::KEY, null, StoreTest::MOST_RECENT_VALUE ], // key without nth |
|
29 | - [StoreTest::KEY, 0, StoreTest::KEY, 0, StoreTest::FIRST_VALUE ], // with index |
|
30 | - [StoreTest::KEY, 1, StoreTest::KEY, 1, StoreTest::SECOND_VALUE ], // with index |
|
26 | + ['1st ' . StoreTest::KEY, null, StoreTest::KEY, 0, StoreTest::FIRST_VALUE], // key with nth |
|
27 | + ['2nd ' . StoreTest::KEY, null, StoreTest::KEY, 1, StoreTest::SECOND_VALUE], // key with nth |
|
28 | + [StoreTest::KEY, null, StoreTest::KEY, null, StoreTest::MOST_RECENT_VALUE], // key without nth |
|
29 | + [StoreTest::KEY, 0, StoreTest::KEY, 0, StoreTest::FIRST_VALUE], // with index |
|
30 | + [StoreTest::KEY, 1, StoreTest::KEY, 1, StoreTest::SECOND_VALUE], // with index |
|
31 | 31 | ]; |
32 | 32 | } |
33 | 33 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | return [ |
37 | 37 | // key, index, value, exception class, exception message |
38 | - ['1st ' . StoreTest::KEY, 1, null, InvalidArgumentException::class, "1 was provided for index param when key '1st " . StoreTest::KEY . "' contains an nth value, but they do not match"], |
|
38 | + ['1st ' . StoreTest::KEY, 1, null, InvalidArgumentException::class, "1 was provided for index param when key '1st " . StoreTest::KEY . "' contains an nth value, but they do not match"], |
|
39 | 39 | ]; |
40 | 40 | } |
41 | 41 | |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | { |
44 | 44 | return [ |
45 | 45 | // key, index, parsed key, parsed index, value, exception class, exception message |
46 | - ['3rd ' . StoreTest::KEY, null, StoreTest::KEY, 2, null, OutOfBoundsException::class, "Entry '3rd " . StoreTest::KEY . "' was not found in the store." ], |
|
47 | - ['No Such Key', null, StoreTest::KEY, 0, null, OutOfBoundsException::class, "Entry 'No Such Key' was not found in the store." ], |
|
46 | + ['3rd ' . StoreTest::KEY, null, StoreTest::KEY, 2, null, OutOfBoundsException::class, "Entry '3rd " . StoreTest::KEY . "' was not found in the store."], |
|
47 | + ['No Such Key', null, StoreTest::KEY, 0, null, OutOfBoundsException::class, "Entry 'No Such Key' was not found in the store."], |
|
48 | 48 | ]; |
49 | 49 | } |
50 | 50 | |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | { |
53 | 53 | return [ |
54 | 54 | // key, index, parsed key, parsed index, built key, value, exception class, exception message |
55 | - ['1st ' . StoreTest::KEY, null, StoreTest::KEY, 0, '1st ' . StoreTest::KEY, StoreTest::SECOND_VALUE, RuntimeException::class, "Entry '1st " . StoreTest::KEY . "' does not match '" . StoreTest::SECOND_VALUE . "'" ], |
|
56 | - ['2nd ' . StoreTest::KEY, null, StoreTest::KEY, 1, '2nd ' . StoreTest::KEY, StoreTest::FIRST_VALUE, RuntimeException::class, "Entry '2nd " . StoreTest::KEY . "' does not match '" . StoreTest::FIRST_VALUE . "'" ], |
|
55 | + ['1st ' . StoreTest::KEY, null, StoreTest::KEY, 0, '1st ' . StoreTest::KEY, StoreTest::SECOND_VALUE, RuntimeException::class, "Entry '1st " . StoreTest::KEY . "' does not match '" . StoreTest::SECOND_VALUE . "'"], |
|
56 | + ['2nd ' . StoreTest::KEY, null, StoreTest::KEY, 1, '2nd ' . StoreTest::KEY, StoreTest::FIRST_VALUE, RuntimeException::class, "Entry '2nd " . StoreTest::KEY . "' does not match '" . StoreTest::FIRST_VALUE . "'"], |
|
57 | 57 | ]; |
58 | 58 | } |
59 | 59 |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | { |
21 | 21 | return [ |
22 | 22 | // key index, parsedKey, parsedIndex, storedValue, checkedValue |
23 | - ['1st ' . self::KEY, null, self::KEY, 0, self::FIRST_VALUE, substr(self::FIRST_VALUE, 0, 2) ], // key with nth |
|
24 | - ['2nd ' . self::KEY, null, self::KEY, 1, self::SECOND_VALUE, substr(self::SECOND_VALUE, 0, 2) ], // key with nth |
|
25 | - [self::KEY, null, self::KEY, null, self::MOST_RECENT_VALUE, substr(self::MOST_RECENT_VALUE, 0, 2) ], // key without nth |
|
26 | - [self::KEY, 0, self::KEY, 0, self::FIRST_VALUE, substr(self::FIRST_VALUE, 0, 2) ], // with index |
|
27 | - [self::KEY, 1, self::KEY, 1, self::SECOND_VALUE, substr(self::SECOND_VALUE, 0, 2) ], // with index |
|
23 | + ['1st ' . self::KEY, null, self::KEY, 0, self::FIRST_VALUE, substr(self::FIRST_VALUE, 0, 2)], // key with nth |
|
24 | + ['2nd ' . self::KEY, null, self::KEY, 1, self::SECOND_VALUE, substr(self::SECOND_VALUE, 0, 2)], // key with nth |
|
25 | + [self::KEY, null, self::KEY, null, self::MOST_RECENT_VALUE, substr(self::MOST_RECENT_VALUE, 0, 2)], // key without nth |
|
26 | + [self::KEY, 0, self::KEY, 0, self::FIRST_VALUE, substr(self::FIRST_VALUE, 0, 2)], // with index |
|
27 | + [self::KEY, 1, self::KEY, 1, self::SECOND_VALUE, substr(self::SECOND_VALUE, 0, 2)], // with index |
|
28 | 28 | ]; |
29 | 29 | } |
30 | 30 | |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | { |
33 | 33 | return [ |
34 | 34 | // key, index, parsedKey, parsedIndex, storedValue, checkedValue |
35 | - ['1st ' . self::KEY, null, self::KEY, 0, self::FIRST_VALUE, self::SECOND_VALUE ], // value mismatch |
|
36 | - ['2nd ' . self::KEY, null, self::KEY, 1, self::SECOND_VALUE, self::FIRST_VALUE ], // value mismatch |
|
37 | - ['3rd ' . self::KEY, null, self::KEY, 2, null, null ], // no such nth |
|
38 | - ['No Such Key', null, 'No Such Key', null, null, null ], // no such key |
|
35 | + ['1st ' . self::KEY, null, self::KEY, 0, self::FIRST_VALUE, self::SECOND_VALUE], // value mismatch |
|
36 | + ['2nd ' . self::KEY, null, self::KEY, 1, self::SECOND_VALUE, self::FIRST_VALUE], // value mismatch |
|
37 | + ['3rd ' . self::KEY, null, self::KEY, 2, null, null], // no such nth |
|
38 | + ['No Such Key', null, 'No Such Key', null, null, null], // no such key |
|
39 | 39 | ]; |
40 | 40 | } |
41 | 41 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | return [ |
45 | 45 | // key value index exception class exception message |
46 | - ['1st ' . self::KEY, null, 1, InvalidArgumentException::class, "1 was provided for index param when key '1st " . self::KEY . "' contains an nth value, but they do not match"], |
|
46 | + ['1st ' . self::KEY, null, 1, InvalidArgumentException::class, "1 was provided for index param when key '1st " . self::KEY . "' contains an nth value, but they do not match"], |
|
47 | 47 | ]; |
48 | 48 | } |
49 | 49 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | { |
16 | 16 | $class = get_parent_class($context); |
17 | 17 | |
18 | - return function () use ($class, $method) { |
|
18 | + return function() use ($class, $method) { |
|
19 | 19 | throw new UnMockedResponseException( |
20 | 20 | "$class::$method was called on mock without having its response mocked" |
21 | 21 | ); |