| @@ 105-117 (lines=13) @@ | ||
| 102 | $this->assertNull($this->queue->peek()); |
|
| 103 | } |
|
| 104 | ||
| 105 | public function testIsFull() { |
|
| 106 | $this->queue = new Queue(); |
|
| 107 | $this->assertFalse($this->queue->isFull()); |
|
| 108 | $this->queue->enqueue(['hello']); |
|
| 109 | $this->queue->enqueue(false); |
|
| 110 | $this->queue->enqueue(['hello']); |
|
| 111 | $this->queue->enqueue(false); |
|
| 112 | $this->queue->enqueue(['hello']); |
|
| 113 | $this->queue->enqueue(false); |
|
| 114 | $this->queue->enqueue(['hello']); |
|
| 115 | $this->queue->enqueue(false); |
|
| 116 | $this->assertFalse($this->queue->isFull()); |
|
| 117 | } |
|
| 118 | ||
| 119 | public function testIsFullWithMaxSize() { |
|
| 120 | $this->queue = new Queue(2); |
|
| @@ 115-127 (lines=13) @@ | ||
| 112 | $this->assertNull($this->stack->peek()); |
|
| 113 | } |
|
| 114 | ||
| 115 | public function testIsFull() { |
|
| 116 | $this->stack = new Stack(); |
|
| 117 | $this->assertFalse($this->stack->isFull()); |
|
| 118 | $this->stack->push(['hello']); |
|
| 119 | $this->stack->push(false); |
|
| 120 | $this->stack->push(['hello']); |
|
| 121 | $this->stack->push(false); |
|
| 122 | $this->stack->push(['hello']); |
|
| 123 | $this->stack->push(false); |
|
| 124 | $this->stack->push(['hello']); |
|
| 125 | $this->stack->push(false); |
|
| 126 | $this->assertFalse($this->stack->isFull()); |
|
| 127 | } |
|
| 128 | ||
| 129 | public function testIsFullWithMaxSize() { |
|
| 130 | $this->stack = new Stack(2); |
|