Example #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;
 }
Example #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]])]);
 }
Example #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);
 }
Example #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();
 }
Example #5
0
 private function whenIExecuteTheCommandWithTheArguments($arguments)
 {
     $command = new ScrutCommand(new ConfigurationReader('cwd', $this->factory));
     $command->execute($arguments);
 }
Example #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();
 }