예제 #1
0
 public function test_paginate()
 {
     $c = new Collection(array('one', 'two', 'three', 'four'));
     $this->assertEquals(array('one', 'two'), $c->forPage(1, 2)->all());
     $this->assertEquals(array('three', 'four'), $c->forPage(2, 2)->all());
     $this->assertEquals(array(), $c->forPage(3, 2)->all());
 }