Esempio n. 1
0
 public function handleEvent($event, atoum\observable $observable)
 {
     parent::handleEvent($event, $observable)->write($event);
     if ($event === atoum\runner::runStop) {
         foreach ($this->writers as $writer) {
             $writer->reset();
         }
     }
     return $this;
 }
Esempio n. 2
0
 public function handleEvent($event, atoum\observable $observable)
 {
     switch ($event) {
         case atoum\test::fail:
         case atoum\test::error:
         case atoum\test::exception:
         case atoum\test::uncompleted:
             $this->fail = true;
             break;
     }
     parent::handleEvent($event, $observable)->build($event);
     if ($event === atoum\runner::runStop) {
         if ($this->title !== null) {
             $this->title = sprintf($this->title, $this->adapter->date($this->locale->_('Y-m-d')), $this->adapter->date($this->locale->_('H:i:s')), $this->fail === true ? $this->locale->_('FAIL') : $this->locale->_('SUCCESS'));
         }
         foreach ($this->writers as $writer) {
             $writer->writeAsynchronousReport($this);
         }
     }
     return $this;
 }
Esempio n. 3
0
 public function handleEvent($event, atoum\observable $observable)
 {
     return parent::handleEvent($event, $observable)->write($event);
 }
Esempio n. 4
0
 public function testResetField()
 {
     $this->if($report = new testedClass())->then->object($report->resetFields())->isIdenticalTo($report)->array($report->getFields())->isEmpty()->if($report->addField(new \mock\mageekguy\atoum\report\field()))->and($report->addField(new \mock\mageekguy\atoum\report\field()))->then->object($report->resetFields())->isIdenticalTo($report)->array($report->getFields())->isEmpty();
 }
Esempio n. 5
0
 public function testIsOverridableBy()
 {
     $this->if($report = new testedClass())->and($otherReport = new testedClass())->then->boolean($report->isOverridableBy($report))->isFalse->boolean($report->isOverridableBy($otherReport))->isTrue;
 }