public function testPaginate() { $c = new Collection(['one', 'two', 'three', 'four']); $this->assertEquals(['one', 'two'], $c->forPage(1, 2)->all()); $this->assertEquals(['three', 'four'], $c->forPage(2, 2)->all()); $this->assertEquals([], $c->forPage(3, 2)->all()); }