public function slice($offset, $length = null)
{
$this->initialize();
return $this->coll->slice($offset, $length);
}
public function testSlice() { list($start, $limit) = array(0, 25); $collection = $this->getMockCollection(); $collection->expects($this->once())->method('slice')->with($start, $limit)->will($this->returnValue(true)); $dm = $this->getMockDocumentManager(); $uow = $this->getMockUnitOfWork(); $pCollection = new PersistentCollection($collection, $dm, $uow, '$'); $pCollection->slice($start, $limit); }