예제 #1
0
 private function whenIExecuteTheCommand($arguments = [])
 {
     ReadConfiguration_TestRunner::$config = null;
     $command = new ScrutCommand(new ConfigurationReader($this->files->fullPath(), new Factory()));
     $command->execute($arguments);
     $this->config = ReadConfiguration_TestRunner::$config;
 }
예제 #2
0
 private function whenIExecuteTheCommand()
 {
     $this->listener = new ArrayListener();
     $factory = new Factory();
     $factory->setSingleton($this->listener);
     $command = new ScrutCommand(new ConfigurationReader($this->files->fullPath(), $factory));
     $command->execute(['-c' . json_encode(['listen' => [ArrayListener::class]])]);
 }
예제 #3
0
 private function executeCommand(Assert $assert, $arguments = [], $shouldReturn = 0)
 {
     $factory = new Factory();
     $factory->setSingleton(new RunTestByName_Configuration($this->files->fullPath(), $this->test, $this->listener), TestRunConfiguration::class);
     $command = new ScrutCommand(new ConfigurationReader($this->files->fullPath(), $factory));
     $returned = $command->execute($arguments);
     $assert($returned, $shouldReturn);
 }
예제 #4
0
 private function whenIExecuteTheCommand()
 {
     $command = new ScrutCommand(new ConfigurationReader('foo', new Factory()));
     $command->execute(['-c' . json_encode(array_merge($this->config, ["runner" => DefineFilters_TestRunner::class]))]);
     $this->filter = DefineFilters_TestRunner::$config->getFilter();
 }
예제 #5
0
 private function whenIExecuteTheCommandWithTheArguments($arguments)
 {
     $command = new ScrutCommand(new ConfigurationReader('cwd', $this->factory));
     $command->execute($arguments);
 }
예제 #6
0
 private function whenIExecuteTheCommand()
 {
     $command = new ScrutCommand(new ConfigurationReader(__DIR__, new Factory()));
     $command->execute(['-c' . json_encode(array_merge($this->config, ["runner" => ComposeTestSuites_TestRunner::class]))]);
     $this->test = ComposeTestSuites_TestRunner::$config->getTest();
 }