public function testCallableIsExecutedInHandlerMethod() { $resolver = new SelfHandlingResolver(); $resolver->setApplication(function ($a) { return $a * 2; }); $command = new Command\Command($resolver); $this->assertEquals(4, $command->dispatch(new CommandStub(2))); }
public function testPostVariablesAutomaticallyResolved() { $_POST = array('a_really-long_variable-name' => 'alan'); $command = new Command\Command(new SelfHandlingResolver()); $this->assertEquals('alan', $command->dispatch('CommandStubTwo')); }
public function testTar($file) { $tar = new \Archips\TarGz(); $command = new \Command\Command($tar); return $command->extractFile($file); }