public function testGetPrevious() { $col = new PropelCollection(); $this->assertNull($col->getPrevious(), 'getPrevious() returns null on an empty collection'); $data = array('bar1', 'bar2', 'bar3'); $col = new PropelCollection($data); $this->assertNull($col->getPrevious(), 'getPrevious() returns null when the internal pointer is at the beginning of the list'); $col->getNext(); $this->assertEquals('bar1', $col->getPrevious(), 'getPrevious() returns the previous element'); $this->assertEquals('bar1', $col->getCurrent(), 'getPrevious() decrements the internal pointer'); }