Exemplo n.º 1
0
 public function it_can_add_last_link()
 {
     $this->addLast('http://yolo');
     $this->getLinks()->shouldBeArray();
     $this->getLinks()->shouldHaveCount(1);
     $this->hasLink(Link::createLast('http://yolo'));
 }
Exemplo n.º 2
0
 public function it_can_get_output(Input $pagination)
 {
     $this->beConstructedWith($pagination);
     $pag = new \stdClass();
     $pag->first = 'http://yolo.com';
     $pag->last = 'http://yolo.com';
     $pagination->getLinks()->willReturn([Link::createFirst('http://yolo.com'), Link::createLast('http://yolo.com')]);
     $this->getOutput()->shouldObjectMatch($pag);
 }
Exemplo n.º 3
0
 public function addLast($href)
 {
     $this->addLink(Link::createLast($href));
 }