public function it_can_add_last_link()
 {
     $this->addLast('http://yolo');
     $this->getLinks()->shouldBeArray();
     $this->getLinks()->shouldHaveCount(1);
     $this->hasLink(Link::createLast('http://yolo'));
 }
 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);
 }
Exemple #3
0
 public function addLast($href)
 {
     $this->addLink(Link::createLast($href));
 }