Exemple #1
0
 public function testConfig()
 {
     $this->assertFalse($this->runner->getBreakOnFailure());
     $this->assertTrue(is_numeric($this->runner->getCatchErrorSeverity()));
     $this->runner->setConfig(array('break_on_failure' => true, 'catch_error_severity' => 100));
     $this->assertTrue($this->runner->getBreakOnFailure());
     $this->assertSame(100, $this->runner->getCatchErrorSeverity());
     $this->runner->setBreakOnFailure(false);
     $this->runner->setCatchErrorSeverity(200);
     $this->assertFalse($this->runner->getBreakOnFailure());
     $this->assertSame(200, $this->runner->getCatchErrorSeverity());
     $this->runner = new Runner(array('break_on_failure' => true, 'catch_error_severity' => 300));
     $this->assertTrue($this->runner->getBreakOnFailure());
     $this->assertSame(300, $this->runner->getCatchErrorSeverity());
     $this->assertEquals(array('break_on_failure' => true, 'catch_error_severity' => 300), $this->runner->getConfig());
 }