mageekguy\atoum\asserters\variable::isNotTrue PHP Method

isNotTrue() public method

public isNotTrue ( $failMessage = null )
    public function isNotTrue($failMessage = null)
    {
        return $this->isNotIdenticalTo(true, $failMessage ?: $this->_('%s is true', $this));
    }

Usage Example

Ejemplo n.º 1
0
 public function testIsNotTrue()
 {
     $this->if($asserter = new sut($generator = new asserter\generator()))->then->boolean($asserter->wasSet())->isFalse()->exception(function () use($asserter) {
         $asserter->isNotNull(rand(-PHP_INT_MAX, PHP_INT_MAX));
     })->isInstanceOf('logicException')->hasMessage('Value is undefined')->if($asserter->setWith(uniqid()))->then->object($asserter->isNotTrue())->isIdenticalTo($asserter)->if($asserter->setWith(true))->then->exception(function () use($asserter) {
         $asserter->isNotTrue();
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s is true'), $asserter));
 }