Example #1
0
 public function testSetWith()
 {
     $this->if($generator = new asserter\generator())->and($parent = new CrawlerAssert($generator))->and($object = new TestedClass($generator, $parent))->and($value = uniqid())->then->exception(function () use($object, $value) {
         $object->setWith($value);
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s is not a crawler'), $object->getTypeOf($value)))->if($crawler = new \Symfony\Component\DomCrawler\Crawler())->then->object($object->setWith($crawler))->isIdenticalTo($object);
 }