Exemple #1
0
 public function testBreakOnFirstFailure()
 {
     $check1 = new AlwaysFailure();
     $check2 = new AlwaysSuccess();
     $this->runner->addCheck($check1);
     $this->runner->addCheck($check2);
     $this->runner->setBreakOnFailure(true);
     $results = $this->runner->run();
     $this->assertInstanceOf('ZendDiagnostics\\Result\\Collection', $results);
     $this->assertEquals(1, $results->count());
     $this->assertFalse($results->offsetExists($check2));
     $this->assertInstanceOf('ZendDiagnostics\\Result\\FailureInterface', $results->offsetGet($check1));
 }