Exemplo n.º 1
0
 /**
  * @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);
 }
Exemplo n.º 2
0
 /**
  * @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);
 }