Total Complexity | 4 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | final class ParameterBagTest extends TestCase |
||
11 | { |
||
12 | public function testBadParameterName() |
||
13 | { |
||
14 | $this->expectExceptionMessage('The key must be a string'); |
||
15 | |||
16 | new Task( |
||
17 | new Profile('test'), |
||
18 | new Job\DummyJob, |
||
19 | [ |
||
20 | 'foo' => 'bar', |
||
21 | 'bar' => 'baz', |
||
22 | 2 => 'foo', |
||
23 | ] |
||
24 | ); |
||
25 | } |
||
26 | |||
27 | public function testNonScalarParameterValue() |
||
28 | { |
||
29 | $this->expectExceptionMessage('The "erroneous" value must be a scalar or null'); |
||
30 | |||
31 | new Task( |
||
32 | new Profile('test'), |
||
33 | new Job\DummyJob, |
||
34 | [ |
||
35 | 'int' => 123, |
||
36 | 'string' => 'foobar', |
||
37 | 'null' => null, |
||
38 | 'bool' => true, |
||
39 | 'erroneous' => [], |
||
40 | ] |
||
41 | ); |
||
42 | } |
||
43 | |||
44 | public function testParameterGetter() |
||
56 | } |
||
57 | |||
58 | public function testNonExistentParameterGetter() |
||
71 | } |
||
72 | } |
||
73 |