| @@ 52-59 (lines=8) @@ | ||
| 49 | * |
|
| 50 | * @return void |
|
| 51 | */ |
|
| 52 | public function testPop() |
|
| 53 | { |
|
| 54 | $element = $this->collection->pop(); |
|
| 55 | ||
| 56 | $this->assertCount(2, $this->collection); |
|
| 57 | $this->assertFalse($this->collection->contains(3)); |
|
| 58 | $this->assertEquals(3, $element); |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * Test shifting element from collection |
|
| @@ 66-73 (lines=8) @@ | ||
| 63 | * |
|
| 64 | * @return void |
|
| 65 | */ |
|
| 66 | public function testShift() |
|
| 67 | { |
|
| 68 | $element = $this->collection->shift(); |
|
| 69 | ||
| 70 | $this->assertCount(2, $this->collection); |
|
| 71 | $this->assertFalse($this->collection->contains(1)); |
|
| 72 | $this->assertEquals(1, $element); |
|
| 73 | } |
|
| 74 | ||
| 75 | /** |
|
| 76 | * Test un-shifting element onto collection |
|