tests/Lists/DoublyLinkedListTest.php 1 location
|
@@ 198-207 (lines=10) @@
|
195 |
|
$this->assertSame([20, true, 15, 3.14], $nodes); |
196 |
|
} |
197 |
|
|
198 |
|
public function testClear() { |
199 |
|
$this->list->push(20); |
200 |
|
$this->list->push(true); |
201 |
|
$this->list->push(15); |
202 |
|
$this->list->push(3.14); |
203 |
|
$this->list->push("string"); |
204 |
|
$this->list->clear(); |
205 |
|
$this->assertEmpty($this->list->toArray()); |
206 |
|
$this->assertEquals($this->list->size(), 0); |
207 |
|
} |
208 |
|
|
209 |
|
public function testIterator() { |
210 |
|
$this->list->push(20); |
tests/Lists/CircularLinkedListTest.php 1 location
|
@@ 199-208 (lines=10) @@
|
196 |
|
$this->assertSame([20, true, 15, 3.14], $nodes); |
197 |
|
} |
198 |
|
|
199 |
|
public function testClear() { |
200 |
|
$this->list->push(20); |
201 |
|
$this->list->push(true); |
202 |
|
$this->list->push(15); |
203 |
|
$this->list->push(3.14); |
204 |
|
$this->list->push("string"); |
205 |
|
$this->list->clear(); |
206 |
|
$this->assertEmpty($this->list->toArray()); |
207 |
|
$this->assertEquals(0, $this->list->size()); |
208 |
|
} |
209 |
|
} |
tests/Lists/SimpleLinkedListTest.php 1 location
|
@@ 137-146 (lines=10) @@
|
134 |
|
$this->assertSame([20, true, 15, 3.14], $nodes); |
135 |
|
} |
136 |
|
|
137 |
|
public function testClear() { |
138 |
|
$this->list->push(20); |
139 |
|
$this->list->push(true); |
140 |
|
$this->list->push(15); |
141 |
|
$this->list->push(3.14); |
142 |
|
$this->list->push("string"); |
143 |
|
$this->list->clear(); |
144 |
|
$this->assertEmpty($this->list->toArray()); |
145 |
|
$this->assertEquals($this->list->size(), 0); |
146 |
|
} |
147 |
|
} |