1 | <?php |
||
16 | class AssertionChainTest extends \PHPUnit_Framework_TestCase |
||
17 | { |
||
18 | /** |
||
19 | * @test |
||
20 | */ |
||
21 | public function it_chains_assertions() |
||
25 | |||
26 | /** |
||
27 | * @test |
||
28 | */ |
||
29 | public function it_shifts_arguments_to_assertions_by_one() |
||
33 | |||
34 | /** |
||
35 | * @test |
||
36 | */ |
||
37 | public function it_knowns_default_error_message() |
||
38 | { |
||
39 | $this->setExpectedException('Assert\InvalidArgumentException', 'Not Null and such'); |
||
40 | |||
41 | \Assert\that(null, 'Not Null and such')->notEmpty(); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @test |
||
46 | */ |
||
47 | public function it_skips_assertions_on_valid_null() |
||
51 | |||
52 | /** |
||
53 | * @test |
||
54 | */ |
||
55 | public function it_validates_all_inputs() |
||
59 | |||
60 | /** |
||
61 | * @test |
||
62 | */ |
||
63 | public function it_has_thatall_shortcut() |
||
67 | |||
68 | /** |
||
69 | * @test |
||
70 | */ |
||
71 | public function it_has_nullor_shortcut() |
||
75 | |||
76 | /** |
||
77 | * @expectedException \RuntimeException |
||
78 | * @expectedExceptionMessage Assertion 'unknownAssertion' does not exist. |
||
79 | * @test |
||
80 | */ |
||
81 | public function it_throws_exception_for_unknown_assertion() |
||
85 | |||
86 | /** |
||
87 | * @test |
||
88 | */ |
||
89 | public function it_has_custom_shortcut() |
||
95 | } |
||
96 |