mageekguy\atoum\asserters\phpArray::strictlyNotContains PHP Метод

strictlyNotContains() публичный Метод

public strictlyNotContains ( $value, $failMessage = null )
    public function strictlyNotContains($value, $failMessage = null)
    {
        return $this->notContainsValue($value, $failMessage, true);
    }

Usage Example

Пример #1
0
 public function testStrictlyNotContains()
 {
     $this->if($asserter = new sut($generator = new asserter\generator()))->then->exception(function () use($asserter) {
         $asserter->contains(uniqid());
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Array is undefined')->if($asserter->setWith(array(1, 2, 3, 4, 5, '6')))->then->exception(function () use($asserter) {
         $asserter->strictlyNotContains(1);
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s strictly contains %s'), $asserter, $asserter->getTypeOf(1)))->exception(function () use($asserter, &$message) {
         $asserter->strictlyNotContains(1, $message = uniqid());
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage($message)->object($asserter->strictlyNotContains('1'))->isIdenticalTo($asserter)->object($asserter->atKey(1)->strictlyNotContains(1))->isIdenticalTo($asserter)->object($asserter->atKey(2)->strictlyNotContains(1))->isIdenticalTo($asserter)->object($asserter->atKey(3)->strictlyNotContains(1))->isIdenticalTo($asserter)->object($asserter->atKey(4)->strictlyNotContains(1))->isIdenticalTo($asserter)->exception(function () use($asserter) {
         $asserter->strictlyNotContains(1);
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s strictly contains %s'), $asserter, $asserter->getTypeOf(1)))->exception(function () use($asserter) {
         $asserter->atKey(0)->strictlyNotContains(1);
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s strictly contains %s at key %s'), $asserter, $asserter->getTypeOf(1), $asserter->getTypeOf(0)))->exception(function () use($asserter) {
         $asserter->atKey('0')->strictlyNotContains(1);
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s strictly contains %s at key %s'), $asserter, $asserter->getTypeOf(1), $asserter->getTypeOf('0')));
 }
All Usage Examples Of mageekguy\atoum\asserters\phpArray::strictlyNotContains