public function testParseInclude() { $line = ['start' => '<h1>', 'file' => TEMPLATE_FILE, 'end' => '</h1>']; $return = ParseInclude::run($line); $this->assertEquals('<h1><?php Templator::load("' . TEMPLATE_FILE . '", Templator::$definedVars); ?></h1>', $return); }
public static function parseInclude($line) { $echo = FindInclude::run($line); if (is_array($echo)) { $line = ParseInclude::run($echo); } return $line; }