Ejemplo n.º 1
0
 public function it_can_add_first_link()
 {
     $this->addFirst('http://yolo');
     $this->getLinks()->shouldBeArray();
     $this->getLinks()->shouldHaveCount(1);
     $this->hasLink(Link::createFirst('http://yolo'));
 }
Ejemplo 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);
 }
Ejemplo n.º 3
0
 public function it_must_pass_link_collection()
 {
     $this->shouldThrow(\Exception::class)->duringInstantiation(Link::createFirst('http'));
 }
Ejemplo n.º 4
0
 public function addFirst($href)
 {
     $this->addLink(Link::createFirst($href));
 }