public function testIndentationIsHonored() { $this->helper->setIndent(4); $this->helper->__invoke('foo'); $string = $this->helper->toString(); $this->assertContains(' <title>', $string); }
/** * 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; }
/** * 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; }