/** * @test */ public function throwsUpAtGettingNonexistantStrategy() { $filelib = new FileLibrary(new MemoryStorageAdapter(), new MemoryBackendAdapter()); $asynchrony = new Asynchrony($filelib); $this->setExpectedException('Xi\\Filelib\\LogicException'); $asynchrony->getStrategy(ExecutionStrategies::STRATEGY_ASYNC_PEKKIS_QUEUE); }
/** * @param string $command * @param array $callback * @param array $params * @return mixed */ private function execute($command, $callback, $params) { $strategy = $this->asynchrony->getStrategy($this->getExecutionStrategy($command)); return $strategy->execute($callback, $params); }