public function testContains() { $this->if($asserter = new asserters\utf8String($generator = new asserter\generator()))->then->exception(function () use($asserter) { $asserter->contains(uniqid()); })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Value is undefined')->if($asserter->setWith($string = $this->getRandomUtf8String()))->and($diff = new diffs\variable())->and($fragment = $this->getRandomUtf8String())->then->exception(function () use($asserter, $fragment) { $asserter->contains($fragment); })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($this->getLocale()->_('String does not contain %s'), $fragment))->object($asserter->contains($string))->isIdenticalTo($asserter)->if($asserter->setWith($this->getRandomUtf8String() . $string . $this->getRandomUtf8String()))->then->object($asserter->contains($string))->isIdenticalTo($asserter)->exception(function () use($asserter, $string, &$fragment) { $asserter->contains($fragment = mb_strtoupper($string, 'UTF-8')); })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($this->getLocale()->_('String does not contain %s'), $fragment)); }