Ejemplo n.º 1
0
 public function testIndentationIsHonored()
 {
     $this->helper->setIndent(4);
     $this->helper->__invoke('foo');
     $string = $this->helper->toString();
     $this->assertContains('    <title>', $string);
 }
Ejemplo n.º 2
0
 /**
  * Turn helper into string
  *
  * @param  string|null $indent
  *
  * @return string
  */
 public function toString($indent = null)
 {
     $output = parent::toString($indent);
     $output = str_replace(['<title>', '</title>'], ['<h1>', '</h1>'], $output);
     if ($output == '<h1></h1>') {
         return '';
     }
     return $output;
 }
Ejemplo n.º 3
0
 /**
  * Turn helper into string
  *
  * @param  string|null $indent
  * @return string
  */
 public function toString($indent = null)
 {
     $output = parent::toString($indent);
     $output = str_replace(array('<title>', '</title>'), array('<h1>', '</h1>'), $output);
     return $output;
 }