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