Exemplo n.º 1
0
 public function setUp()
 {
     $this->dispatcher = new Symfony\Component\EventDispatcher\EventDispatcher();
     $settings = \Codeception\Configuration::$defaultSuiteSettings;
     $settings['class_name'] = 'CodeGuy';
     $this->suiteman = new \Codeception\SuiteManager($this->dispatcher, 'suite', $settings);
     $printer = \Codeception\Util\Stub::makeEmpty('PHPUnit_TextUI_ResultPrinter');
     $this->runner = new \Codeception\PHPUnit\Runner();
     $this->runner->setPrinter($printer);
 }
Exemplo n.º 2
0
 public function printResult()
 {
     $result = $this->getResult();
     $result->flushListeners();
     $printer = $this->runner->getPrinter();
     $printer->printResult($result);
     $this->dispatcher->dispatch(Events::RESULT_PRINT_AFTER, new Event\PrintResultEvent($result, $printer));
 }
Exemplo n.º 3
0
 public function printResult()
 {
     $result = $this->getResult();
     $result->flushListeners();
     $printer = $this->runner->getPrinter();
     $printer->printResult($result);
     $this->dispatcher->dispatch('result.print.after', new Event\PrintResult($result, $printer));
 }
Exemplo n.º 4
0
 public function run(PHPUnit\Runner $runner, \PHPUnit_Framework_TestResult $result, $options)
 {
     $this->dispatcher->dispatch(Events::SUITE_BEFORE, new Event\SuiteEvent($this->suite, $result, $this->settings));
     $runner->doEnhancedRun($this->suite, $result, $options);
     $this->dispatcher->dispatch(Events::SUITE_AFTER, new Event\SuiteEvent($this->suite, $result, $this->settings));
 }
Exemplo n.º 5
0
 public function run(\Codeception\PHPUnit\Runner $runner, \PHPUnit_Framework_TestResult $result, $options)
 {
     $this->dispatcher->dispatch('suite.before', new Event\Suite($this->suite, $result, $this->settings));
     $runner->doEnhancedRun($this->suite, $result, $options);
     $this->dispatcher->dispatch('suite.after', new Event\Suite($this->suite, $result, $this->settings));
 }
Exemplo n.º 6
0
 public function printResult()
 {
     $result = $this->getResult();
     $result->flushListeners();
     $this->runner->getPrinter()->printResult($result);
 }
Exemplo n.º 7
0
 public function printResult()
 {
     $this->runner->getPrinter()->printResult($this->getResult());
 }