Example #1
0
 /**
  * Generate the label.
  *
  * @return string
  */
 public function generate()
 {
     if ($this->isVisible()) {
         return parent::generate();
     }
     return '';
 }
Example #2
0
 function it_casts_to_string_contains_content(Node $a)
 {
     $content = '<a href="#test">Test</a>';
     $a->generate()->willReturn($content);
     $a->__toString()->willReturn($content);
     $this->addChild($a);
     $this->generate()->shouldReturn('<p class="example" id="test">' . $content . '</p>' . PHP_EOL);
 }