Example #1
0
 public function testConsoleSettingGetting()
 {
     $this->assertSame($this->console, $this->reporter->getConsole());
     $newConsole = new ConsoleAdapter();
     $this->reporter->setConsole($newConsole);
     $this->assertSame($newConsole, $this->reporter->getConsole());
 }
Example #2
0
 public function testStoppedNotice()
 {
     $checks = new ArrayObject();
     $check = null;
     $results = new Collection();
     for ($x = 0; $x < 15; $x++) {
         $checks[] = $check = new AlwaysSuccessCheck();
         $results[$check] = new Success();
     }
     ob_start();
     $this->reporter->onStart($checks, array());
     ob_clean();
     $this->reporter->onStop($results);
     $this->reporter->onFinish($results);
     $this->assertStringMatchesFormat('%ADiagnostics aborted%A', trim(ob_get_clean()));
 }