public function decorate(call $call) { $string = parent::decorate($call); if ($string !== '') { $string = $this->class . '::' . $string; } return $string; }
public function testDecorate() { $this->if($decorator = new testedClass())->then->string($decorator->decorate(new call()))->isEmpty()->string($decorator->decorate(new call($function = uniqid())))->isEqualTo($function . '(*)')->string($decorator->decorate(new call(null, array())))->isEmpty()->string($decorator->decorate(new call($function = uniqid(), array())))->isEqualTo($function . '()')->string($decorator->decorate(new call($function = uniqid(), $arguments = array(uniqid(), uniqid()))))->isEqualTo($function . '(' . $decorator->getArgumentsDecorator()->decorate($arguments) . ')'); }