Example #1
0
 public function decorate(call $call)
 {
     $string = parent::decorate($call);
     if ($string !== '') {
         $string = $this->class . '::' . $string;
     }
     return $string;
 }
Example #2
0
 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) . ')');
 }