예제 #1
0
파일: score.php 프로젝트: xihewang/atoum
 public function reset()
 {
     $this->phpPath = null;
     $this->phpVersion = null;
     $this->atoumPath = null;
     $this->atoumVersion = null;
     return parent::reset();
 }
예제 #2
0
파일: runner.php 프로젝트: eroluysal/atoum
 private static function getFailMethods(atoum\score $score)
 {
     return self::mergeMethods(self::mergeMethods(self::mergeMethods($score->getMethodsWithFail(), $score->getMethodsWithError()), $score->getMethodsWithException()), $score->getMethodsNotCompleted());
 }
예제 #3
0
파일: score.php 프로젝트: xihewang/atoum
 public function testDeleteError()
 {
     $this->if($score = new atoum\score())->exception(function () use($score, &$key) {
         $score->deleteError($key = rand(-PHP_INT_MAX, PHP_INT_MAX));
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic\\invalidArgument')->hasMessage('Error key \'' . $key . '\' does not exist')->if($score->addError(uniqid(), uniqid(), uniqid(), rand(1, PHP_INT_MAX), $type = rand(1, PHP_INT_MAX), $message = uniqid(), uniqid(), rand(1, PHP_INT_MAX)))->then->integer($score->errorExists($message, $type))->isEqualTo(0)->object($score->deleteError(0))->isIdenticalTo($score)->variable($score->errorExists($message, $type))->isNull();
 }
예제 #4
0
파일: score.php 프로젝트: xihewang/atoum
 public function merge(score $score)
 {
     $this->passNumber += $score->getPassNumber();
     $this->failAssertions = array_merge($this->failAssertions, $score->failAssertions);
     $this->exceptions = array_merge($this->exceptions, $score->exceptions);
     $this->runtimeExceptions = array_merge($this->runtimeExceptions, $score->runtimeExceptions);
     $this->errors = array_merge($this->errors, $score->errors);
     $this->outputs = array_merge($this->outputs, $score->outputs);
     $this->durations = array_merge($this->durations, $score->durations);
     $this->memoryUsages = array_merge($this->memoryUsages, $score->memoryUsages);
     $this->voidMethods = array_merge($this->voidMethods, $score->voidMethods);
     $this->uncompletedMethods = array_merge($this->uncompletedMethods, $score->uncompletedMethods);
     $this->skippedMethods = array_merge($this->skippedMethods, $score->skippedMethods);
     $this->coverage->merge($score->coverage);
     return $this;
 }
예제 #5
0
파일: score.php 프로젝트: ronan-gloo/atoum
 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;
 }
예제 #6
0
파일: score.php 프로젝트: xihewang/atoum
 public function addError($file, $class, $method, $line, $type, $message, $errorFile = null, $errorLine = null, $case = null, $dataSetKey = null, $dataSetProvider = null)
 {
     return parent::addError($file, $class, $method, $line, $type, $message, $errorFile, $errorLine, $case ?: $this->case, $dataSetKey ?: $this->dataSetKey, $dataSetProvider ?: $this->dataSetProvider);
 }