public function testUnshift() { $items = $this->createRandomItems(); $list = new ArrayList($items); $prev_count = $list->getSize(); $new_item = TestObject::createRandomInstance(); $list->unshift($new_item); $this->assertEquals($prev_count + 1, $list->getSize()); $this->assertEquals($new_item, $list->getFirst()); }