1 | <?php |
||
12 | final class BagTest extends TestCase |
||
13 | { |
||
14 | /** |
||
15 | * Verify basic behavior of add(). |
||
16 | * |
||
17 | * @test |
||
18 | * @covers ::add |
||
19 | * @uses \SubjectivePHP\Spl\DataStructures\Bag::jsonSerialize |
||
20 | * |
||
21 | * @return void |
||
22 | */ |
||
23 | public function add() |
||
29 | |||
30 | /** |
||
31 | * Verify basic behavior of remove(). |
||
32 | * |
||
33 | * @test |
||
34 | * @covers ::remove |
||
35 | * @uses \SubjectivePHP\Spl\DataStructures\Bag |
||
36 | * |
||
37 | * @return void |
||
38 | */ |
||
39 | public function remove() |
||
47 | |||
48 | /** |
||
49 | * Verify behavior of remove() with empty bag. |
||
50 | * |
||
51 | * @test |
||
52 | * @covers ::remove |
||
53 | * @expectedException \RuntimeException |
||
54 | * @expectedExceptionMessage Bag is empty |
||
55 | * |
||
56 | * @return void |
||
57 | */ |
||
58 | public function removeEmpty() |
||
62 | |||
63 | /** |
||
64 | * Verify basic behavior of count(). |
||
65 | * |
||
66 | * @test |
||
67 | * @covers ::count |
||
68 | * @uses \SubjectivePHP\Spl\DataStructures\Bag::add |
||
69 | * |
||
70 | * @return void |
||
71 | */ |
||
72 | public function testCount() |
||
80 | |||
81 | /** |
||
82 | * Verify basic behavior of isEmpty(); |
||
83 | * |
||
84 | * @test |
||
85 | * @covers ::isEmpty |
||
86 | * @uses \SubjectivePHP\Spl\DataStructures\Bag::add |
||
87 | * |
||
88 | * @return void |
||
89 | */ |
||
90 | public function testIsEmpty() |
||
97 | |||
98 | /** |
||
99 | * Verify basic behavior of jsonSerialize() |
||
100 | * |
||
101 | * @test |
||
102 | * @covers ::jsonSerialize |
||
103 | * @uses \SubjectivePHP\Spl\DataStructures\Bag::add |
||
104 | * |
||
105 | * @return void |
||
106 | */ |
||
107 | public function jsonSerialize() |
||
113 | |||
114 | /** |
||
115 | * Verify \Iterator implementation. |
||
116 | * |
||
117 | * @test |
||
118 | * @covers ::rewind |
||
119 | * @covers ::current |
||
120 | * @covers ::key |
||
121 | * @covers ::next |
||
122 | * @covers ::valid |
||
123 | * @uses \SubjectivePHP\Spl\DataStructures\Bag::add |
||
124 | * |
||
125 | * @return void |
||
126 | */ |
||
127 | public function iteratator() |
||
135 | |||
136 | /** |
||
137 | * Verify basic behavior of clear(). |
||
138 | * |
||
139 | * @test |
||
140 | * @covers ::clear |
||
141 | * @uses \SubjectivePHP\Spl\DataStructures\Bag |
||
142 | * |
||
143 | * @return void |
||
144 | */ |
||
145 | public function clear() |
||
154 | } |
||
155 |