| @@ 93-102 (lines=10) @@ | ||
| 90 | $this->assertEquals(20, $this->list->delete(0)); |
|
| 91 | } |
|
| 92 | ||
| 93 | public function testShift() { |
|
| 94 | $this->assertNull($this->list->shift()); |
|
| 95 | $this->list->push(20); |
|
| 96 | $this->list->push(true); |
|
| 97 | $this->assertEquals(20, $this->list->shift()); |
|
| 98 | $this->assertEquals(1, $this->list->size()); |
|
| 99 | $this->assertEquals(true, $this->list->shift()); |
|
| 100 | $this->assertEquals(true, $this->list->empty()); |
|
| 101 | $this->assertNull($this->list->shift()); |
|
| 102 | } |
|
| 103 | ||
| 104 | public function testPop() { |
|
| 105 | $this->list->push(20); |
|
| @@ 70-79 (lines=10) @@ | ||
| 67 | $this->assertEquals(20, $this->list->delete(0)); |
|
| 68 | } |
|
| 69 | ||
| 70 | public function testShift() { |
|
| 71 | $this->assertNull($this->list->shift()); |
|
| 72 | $this->list->push(20); |
|
| 73 | $this->list->push(true); |
|
| 74 | $this->assertEquals(20, $this->list->shift()); |
|
| 75 | $this->assertEquals(1, $this->list->size()); |
|
| 76 | $this->assertEquals(true, $this->list->shift()); |
|
| 77 | $this->assertEquals(true, $this->list->empty()); |
|
| 78 | $this->assertNull($this->list->shift()); |
|
| 79 | } |
|
| 80 | ||
| 81 | public function testPop() { |
|
| 82 | //TODO |
|
| @@ 93-102 (lines=10) @@ | ||
| 90 | $this->assertEquals(20, $this->list->delete(0)); |
|
| 91 | } |
|
| 92 | ||
| 93 | public function testShift() { |
|
| 94 | $this->assertNull($this->list->shift()); |
|
| 95 | $this->list->push(20); |
|
| 96 | $this->list->push(true); |
|
| 97 | $this->assertEquals(20, $this->list->shift()); |
|
| 98 | $this->assertEquals(1, $this->list->size()); |
|
| 99 | $this->assertEquals(true, $this->list->shift()); |
|
| 100 | $this->assertEquals(true, $this->list->empty()); |
|
| 101 | $this->assertNull($this->list->shift()); |
|
| 102 | } |
|
| 103 | ||
| 104 | public function testPop() { |
|
| 105 | $this->list->push(20); |
|