getRuntimeExceptions() public méthode

Exemple #1
0
 public function testMerge()
 {
     $this->if($score = new atoum\score())->and($otherScore = new atoum\score())->then->object($score->merge($otherScore))->isIdenticalTo($score)->integer($score->getPassNumber())->isZero()->array($score->getFailAssertions())->isEmpty()->array($score->getExceptions())->isEmpty()->array($score->getRuntimeExceptions())->isEmpty()->array($score->getErrors())->isEmpty()->array($score->getOutputs())->isEmpty()->array($score->getDurations())->isEmpty()->array($score->getMemoryUsages())->isEmpty()->array($score->getUncompletedMethods())->isEmpty()->array($score->getSkippedMethods())->isEmpty()->if($score->addPass())->and($score->addFail(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX), new atoum\asserters\integer(new atoum\asserter\generator()), uniqid()))->and($score->addException(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX), new \exception()))->and($score->addRuntimeException(uniqid(), uniqid(), uniqid(), new atoum\exceptions\runtime()))->and($score->addError(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX), E_ERROR, uniqid(), uniqid(), rand(1, PHP_INT_MAX)))->and($score->addOutput(uniqid(), uniqid(), uniqid(), uniqid()))->and($score->addDuration(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX)))->and($score->addMemoryUsage(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX)))->and($score->addUncompletedMethod(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX), uniqid()))->and($score->addSkippedMethod(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX), uniqid()))->then->object($score->merge($otherScore))->isIdenticalTo($score)->integer($score->getPassNumber())->isEqualTo(1)->integer($score->getFailNumber())->isEqualTo(1)->integer($score->getExceptionNumber())->isEqualTo(1)->integer($score->getErrorNumber())->isEqualTo(1)->integer($score->getOutputNumber())->isEqualTo(1)->integer($score->getDurationNumber())->isEqualTo(1)->integer($score->getMemoryUsageNumber())->isEqualTo(1)->integer($score->getUncompletedMethodNumber())->isEqualTo(1)->integer($score->getSkippedMethodNumber())->isEqualTo(1)->if($otherScore->addPass())->and($otherScore->addFail(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX), new atoum\asserters\integer(new atoum\asserter\generator()), uniqid()))->and($otherScore->addException(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX), new \exception()))->and($otherScore->addRuntimeException(uniqid(), uniqid(), uniqid(), new atoum\exceptions\runtime()))->and($otherScore->addError(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX), E_ERROR, uniqid(), uniqid(), rand(1, PHP_INT_MAX)))->and($otherScore->addOutput(uniqid(), uniqid(), uniqid(), uniqid()))->and($otherScore->addDuration(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX)))->and($otherScore->addMemoryUsage(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX)))->and($otherScore->addUncompletedMethod(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX), uniqid()))->and($otherScore->addSkippedMethod(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX), uniqid()))->then->object($score->merge($otherScore))->isIdenticalTo($score)->integer($score->getPassNumber())->isEqualTo(2)->integer($score->getFailNumber())->isEqualTo(2)->integer($score->getExceptionNumber())->isEqualTo(2)->integer($score->getRuntimeExceptionNumber())->isEqualTo(2)->integer($score->getErrorNumber())->isEqualTo(2)->integer($score->getOutputNumber())->isEqualTo(2)->integer($score->getDurationNumber())->isEqualTo(2)->integer($score->getMemoryUsageNumber())->isEqualTo(2)->integer($score->getUncompletedMethodNumber())->isEqualTo(2)->integer($score->getSkippedMethodNumber())->isEqualTo(2)->object($score->merge($otherScore))->isIdenticalTo($score)->integer($score->getPassNumber())->isEqualTo(3)->integer($score->getFailNumber())->isEqualTo(3)->integer($score->getExceptionNumber())->isEqualTo(3)->integer($score->getRuntimeExceptionNumber())->isEqualTo(3)->integer($score->getErrorNumber())->isEqualTo(3)->integer($score->getOutputNumber())->isEqualTo(3)->integer($score->getDurationNumber())->isEqualTo(3)->integer($score->getMemoryUsageNumber())->isEqualTo(3)->integer($score->getUncompletedMethodNumber())->isEqualTo(3)->integer($score->getSkippedMethodNumber())->isEqualTo(3);
 }
Exemple #2
0
 public function merge(score $score)
 {
     $this->passNumber += $score->getPassNumber();
     $this->failAssertions = array_merge($this->failAssertions, $score->getFailAssertions());
     $this->exceptions = array_merge($this->exceptions, $score->getExceptions());
     $this->runtimeExceptions = array_merge($this->runtimeExceptions, $score->getRuntimeExceptions());
     $this->errors = array_merge($this->errors, $score->getErrors());
     $this->outputs = array_merge($this->outputs, $score->getOutputs());
     $this->durations = array_merge($this->durations, $score->getDurations());
     $this->memoryUsages = array_merge($this->memoryUsages, $score->getMemoryUsages());
     $this->voidMethods = array_merge($this->voidMethods, $score->getVoidMethods());
     $this->uncompletedMethods = array_merge($this->uncompletedMethods, $score->getUncompletedMethods());
     $this->skippedMethods = array_merge($this->skippedMethods, $score->getSkippedMethods());
     $this->coverage->merge($score->getCoverage());
     return $this;
 }