public function testConstruct() { $el = new CircularListElement(); $this->assertNull($el->getValue()); $this->assertEquals($el, $el->getNext()); $this->assertEquals($el, $el->getPrev()); }
/** * Go to the previous element and returns it. * * @return CircularListElement|null Previous element * * @api */ public function prev() { $this->cursor = $this->cursor->getPrev(); return $this->cursor; }