public function testStrictlyNotContainsValues() { $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)))->then->exception(function () use($asserter) { $asserter->strictlyNotContainsValues(array(1)); })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s should not contain strictly values %s'), $asserter, $asserter->getTypeOf(array(1))))->exception(function () use($asserter, &$message) { $asserter->strictlyNotContainsValues(array(1), $message = uniqid()); })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage($message)->exception(function () use($asserter, &$message) { $asserter->strictlyNotContainsValues(array(1, '2', 3), $message = uniqid()); })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage($message)->object($asserter->strictlyNotContainsValues(array('1')))->isIdenticalTo($asserter)->object($asserter->strictlyNotContainsValues(array(6, 7, '2', 8)))->isIdenticalTo($asserter); }
public function testStrictlyNotContains() { $this->if($asserter = new asserters\phpArray($generator = new asserter\generator()))->then->boolean($asserter->wasSet())->isFalse()->exception(function () use($asserter) { $asserter->contains(uniqid()); })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Array is undefined')->if($asserter->setWith(array(1)))->then->exception(function () use($asserter) { $asserter->strictlyNotContains(1); })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s contains strictly %s'), $asserter, $asserter->getTypeOf(1)))->object($asserter->strictlyNotContains('1'))->isIdenticalTo($asserter); }