コード例 #1
0
ファイル: object.php プロジェクト: ronan-gloo/atoum
 public function testSetWith()
 {
     $this->if($asserter = new asserters\object($generator = new asserter\generator()))->then->exception(function () use($asserter, &$value) {
         $asserter->setWith($value = uniqid());
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('%s is not an object'), $asserter->getTypeOf($value)))->string($asserter->getValue())->isEqualTo($value)->object($asserter->setWith($value = $this))->isIdenticalTo($asserter)->object($asserter->getValue())->isIdenticalTo($value)->object($asserter->setWith($value = uniqid(), false))->isIdenticalTo($asserter)->string($asserter->getValue())->isEqualTo($value);
 }