template->cachepath . str_replace('/', '.', $file) . '.php'; $this->assertFileNotExists($cache_file); $expected = file_get_contents(dirname(__FILE__) . '/templates/' . $expected); // apparently the template engine does not put // the trailing newline into compiled templates $expected = trim($expected); $this->run_template($file, $vars, $block_vars, $destroy, $expected, $cache_file); } /** * @dataProvider template_data_error */ public function test_template_error($description, $file, $vars, $block_vars, $destroy, $error, $expected) { $cache_file = $this->template->cachepath . str_replace('/', '.', $file) . '.php'; $this->assertFileNotExists($cache_file); $expected = file_get_contents(dirname(__FILE__) . '/templates/' . $expected); // apparently the template engine does not put // the trailing newline into compiled templates $expected = trim($expected); $this->setExpectedTriggerError($error, $expected); $this->run_template($file, $vars, $block_vars, $destroy, '', $cache_file); } }