errorExists() public method

public errorExists ( $message = null, $type = null, $messageIsPattern = false )
Beispiel #1
0
 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();
 }