| @@ 138-158 (lines=21) @@ | ||
| 135 | /* |
|
| 136 | * Test removeAll. |
|
| 137 | */ |
|
| 138 | public function testRemoveAll() |
|
| 139 | { |
|
| 140 | $this |
|
| 141 | ->given( |
|
| 142 | $unique = $this->uniqueValue(), |
|
| 143 | $random = $this->randomValue(), |
|
| 144 | $collection = $this->emptyCollection() |
|
| 145 | ) |
|
| 146 | ->and($collection->addAll([$unique, $random])) |
|
| 147 | ->then() |
|
| 148 | ->list($collection) |
|
| 149 | ->contains($unique) |
|
| 150 | ->list($collection) |
|
| 151 | ->contains($random) |
|
| 152 | ->and() |
|
| 153 | ->when($collection->removeAll([$unique, $random])) |
|
| 154 | ->then() |
|
| 155 | ->boolean($collection->isEmpty()) |
|
| 156 | ->isTrue() |
|
| 157 | ; |
|
| 158 | } |
|
| 159 | ||
| 160 | /** |
|
| 161 | * Test find. |
|
| @@ 156-176 (lines=21) @@ | ||
| 153 | /* |
|
| 154 | * Test removeAll. |
|
| 155 | */ |
|
| 156 | public function testRemoveAll() |
|
| 157 | { |
|
| 158 | $this |
|
| 159 | ->given( |
|
| 160 | $unique = $this->uniqueValue(), |
|
| 161 | $random = $this->randomValue(), |
|
| 162 | $collection = $this->emptyCollection() |
|
| 163 | ) |
|
| 164 | ->and($collection->addAll([$unique, $random])) |
|
| 165 | ->then() |
|
| 166 | ->set($collection) |
|
| 167 | ->contains($unique) |
|
| 168 | ->set($collection) |
|
| 169 | ->contains($random) |
|
| 170 | ->and() |
|
| 171 | ->when($collection->removeAll([$unique, $random])) |
|
| 172 | ->then() |
|
| 173 | ->boolean($collection->isEmpty()) |
|
| 174 | ->isTrue() |
|
| 175 | ; |
|
| 176 | } |
|
| 177 | ||
| 178 | /** |
|
| 179 | * Test find. |
|