Exemplo n.º 1
0
 public function testConstruct()
 {
     $el = new CircularListElement();
     $this->assertNull($el->getValue());
     $this->assertEquals($el, $el->getNext());
     $this->assertEquals($el, $el->getPrev());
 }
Exemplo n.º 2
0
 /**
  * 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;
 }