isNotEqualTo() public méthode

public isNotEqualTo ( $value, $failMessage = null )
Exemple #1
0
 public function testIsNotEqualTo()
 {
     $this->if($asserter = new sut($generator = new asserter\generator()))->then->boolean($asserter->wasSet())->isFalse()->exception(function () use($asserter) {
         $asserter->isNotEqualTo(rand(-PHP_INT_MAX, PHP_INT_MAX));
     })->isInstanceOf('logicException')->hasMessage('Value is undefined')->if($asserter->setWith($value = uniqid()))->then->object($asserter->isNotEqualTo(uniqid()))->isIdenticalTo($asserter)->exception(function () use($asserter, $value) {
         $asserter->isNotEqualTo($value);
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s is equal to %s'), $asserter, $asserter->getTypeOf($value)))->exception(function () use($asserter, $value, &$failMessage) {
         $asserter->isNotEqualTo($value, $failMessage = uniqid());
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage($failMessage);
 }