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