mageekguy\atoum\test\adapter\call::setDecorator PHP Method

setDecorator() public method

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;
    }

Usage Example

Beispiel #1
0
 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());
 }
All Usage Examples Of mageekguy\atoum\test\adapter\call::setDecorator