/** * __call * * @param $method * @param $arguments * * @return mixed * @throws \Brown298\DataTablesBundle\Exceptions\ProcessorException */ public function __call($method, $arguments) { 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 call_user_func_array(array($this->serverProcessorService, $method), $arguments); }
/** * testGetSetRepository * */ public function testGetSetRepository() { $this->service->setRepository($this->repository); $this->assertEquals($this->repository, $this->service->getRepository()); }