1 | <?php |
||
10 | final class BooleansTest extends TestCase |
||
11 | { |
||
12 | /** |
||
13 | * @test |
||
14 | * @covers ::filter |
||
15 | */ |
||
16 | public function filterBasic() |
||
28 | |||
29 | /** |
||
30 | * @test |
||
31 | * @covers ::filter |
||
32 | */ |
||
33 | public function filterAllowNullIsTrueAndNullValue() |
||
37 | |||
38 | /** |
||
39 | * @test |
||
40 | * @covers ::filter |
||
41 | * @expectedException \TraderInteractive\Filter\Exception |
||
42 | * @expectedExceptionMessage "1" $value is not a string |
||
43 | */ |
||
44 | public function filterNonStringAndNonBoolValue() |
||
48 | |||
49 | /** |
||
50 | * @test |
||
51 | * @covers ::filter |
||
52 | * @expectedException \TraderInteractive\Filter\Exception |
||
53 | * @expectedExceptionMessage invalid is not 'true' or 'false' disregarding case and whitespace |
||
54 | */ |
||
55 | public function filterInvalidString() |
||
59 | |||
60 | /** |
||
61 | * @test |
||
62 | * @covers ::filter |
||
63 | */ |
||
64 | public function filterCustomTrueValues() |
||
68 | |||
69 | /** |
||
70 | * @test |
||
71 | * @covers ::filter |
||
72 | */ |
||
73 | public function filterCustomFalseValues() |
||
77 | |||
78 | /** |
||
79 | * @test |
||
80 | * @covers ::filter |
||
81 | * @expectedException \TraderInteractive\Filter\Exception |
||
82 | * @expectedExceptionMessage true is not 'y' or '1' or 'n' or '0' disregarding case and whitespace |
||
83 | */ |
||
84 | public function filterCustomBoolValuesInvalidString() |
||
88 | |||
89 | /** |
||
90 | * Verify basic behavior of convert(). |
||
91 | * |
||
92 | * @test |
||
93 | * @covers ::convert |
||
94 | * |
||
95 | * @return void |
||
96 | */ |
||
97 | public function convert() |
||
102 | } |
||
103 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.