tests/Lists/DoublyLinkedListTest.php 1 location
|
@@ 187-196 (lines=10) @@
|
| 184 |
|
$this->assertSame([20, true, 15, 3.14, "string"], $data); |
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
public function testToArray() { |
| 188 |
|
$this->list->push(20); |
| 189 |
|
$this->list->push(true); |
| 190 |
|
$this->list->push(15); |
| 191 |
|
$this->list->push(3.14); |
| 192 |
|
$this->list->push("string"); |
| 193 |
|
$this->list->pop(); |
| 194 |
|
$nodes = $this->list->toArray(); |
| 195 |
|
$this->assertSame([20, true, 15, 3.14], $nodes); |
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
public function testClear() { |
| 199 |
|
$this->list->push(20); |
tests/Lists/ArrayListTest.php 1 location
|
@@ 185-194 (lines=10) @@
|
| 182 |
|
$this->assertSame([20, true, 15, 3.14, "string"], $data); |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
public function testToArray() { |
| 186 |
|
$this->list->push(20); |
| 187 |
|
$this->list->push(true); |
| 188 |
|
$this->list->push(15); |
| 189 |
|
$this->list->push(3.14); |
| 190 |
|
$this->list->push("string"); |
| 191 |
|
$this->list->pop(); |
| 192 |
|
$nodes = $this->list->toArray(); |
| 193 |
|
$this->assertSame([20, true, 15, 3.14], $nodes); |
| 194 |
|
} |
| 195 |
|
|
| 196 |
|
public function testClear() { |
| 197 |
|
$this->list->push(20); |
tests/Lists/CircularLinkedListTest.php 1 location
|
@@ 187-197 (lines=11) @@
|
| 184 |
|
$this->assertSame([20, true, 15, 3.14, "string"], $data); |
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
public function testToArray() { |
| 188 |
|
$this->list->push(20); |
| 189 |
|
$this->list->push(true); |
| 190 |
|
$this->list->push(15); |
| 191 |
|
$this->list->push(3.14); |
| 192 |
|
$this->list->push("string"); |
| 193 |
|
$this->list->pop(); |
| 194 |
|
$nodes = $this->list->toArray(); |
| 195 |
|
$this->assertCount(4, $nodes); |
| 196 |
|
$this->assertSame([20, true, 15, 3.14], $nodes); |
| 197 |
|
} |
| 198 |
|
|
| 199 |
|
public function testClear() { |
| 200 |
|
$this->list->push(20); |
tests/Lists/SimpleLinkedListTest.php 1 location
|
@@ 126-135 (lines=10) @@
|
| 123 |
|
$this->assertSame([20, true, 15, 3.14, "string"], $data); |
| 124 |
|
} |
| 125 |
|
|
| 126 |
|
public function testToArray() { |
| 127 |
|
$this->list->push(20); |
| 128 |
|
$this->list->push(true); |
| 129 |
|
$this->list->push(15); |
| 130 |
|
$this->list->push(3.14); |
| 131 |
|
$this->list->push("string"); |
| 132 |
|
$this->list->pop(); |
| 133 |
|
$nodes = $this->list->toArray(); |
| 134 |
|
$this->assertSame([20, true, 15, 3.14], $nodes); |
| 135 |
|
} |
| 136 |
|
|
| 137 |
|
public function testClear() { |
| 138 |
|
$this->list->push(20); |