public setDecorator ( mageekguy\atoum\test\adapter\call\decorator $decorator = null ) | ||
$decorator | mageekguy\atoum\test\adapter\call\decorator |
public function setDecorator(adapter\call\decorator $decorator = null)
{
$this->decorator = $decorator ?: new adapter\call\decorator();
return $this;
}
public function testSetDecorator() { $this->if($call = new testedClass())->then->object($call->setDecorator($decorator = new decorator()))->isIdenticalTo($call)->object($call->getDecorator())->isIdenticalTo($decorator)->object($call->setDecorator())->isIdenticalTo($call)->object($call->getDecorator())->isNotIdenticalTo($decorator)->isEqualTo(new decorator()); }