public function testLastItemValue() { $last = $this->collection->getLast(); $this->assertSame(1, $last->getValue()); $this->assertSame(0, $last->getKey()); $this->collection->set('foo', 'value'); $this->assertSame('foo', $this->collection->getLast()->getKey()); $this->collection->remove('foo'); $this->assertSame(1, $this->collection->getLast()->getValue()); $this->setExpectedException('\\Exception'); $this->collection->remove(0); $this->collection->getLast(); }