mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[feature/template-engine] Refactor $config dependency out of the filter
The template stream filter no longer depends on the $config global. Instead it uses a 'allow_php' param that is passed via stream_bucket_append's last argument. Tests also adjusted. PHPBB3-9726
This commit is contained in:
@@ -328,15 +328,13 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
|
||||
|
||||
public function test_php()
|
||||
{
|
||||
$GLOBALS['config']['tpl_allow_php'] = true;
|
||||
$this->setup_engine(array('tpl_allow_php' => true));
|
||||
|
||||
$cache_file = $this->template->cachepath . 'php.html.php';
|
||||
|
||||
$this->assertFileNotExists($cache_file);
|
||||
|
||||
$this->run_template('php.html', array(), array(), array(), 'test', $cache_file);
|
||||
|
||||
$GLOBALS['config']['tpl_allow_php'] = false;
|
||||
}
|
||||
|
||||
public static function alter_block_array_data()
|
||||
|
Reference in New Issue
Block a user