/** * findAll * * @throws \Brown298\DataTablesBundle\Exceptions\ProcessorException */ public function findAll() { if (!$this->serverProcessorService instanceof ServerProcessService) { throw new ProcessorException('The container must be set'); } if (!$this->repository instanceof EntityRepository) { throw new ProcessorException('The entity repository must be set'); } $this->serverProcessorService->setRepository($this->repository); return $this->serverProcessorService->findAll(); }
/** * testFindAllCallsProcessor * */ public function testFindAllCallsProcessor() { $this->processor = Phake::mock('Brown298\\DataTablesBundle\\Service\\Processor\\RepositoryProcessor'); $this->service->setProcessor($this->processor); $this->service->findAll(); Phake::verify($this->processor)->buildFindAll(); }