diff --git a/phpBB/styles/prosilver/template/memberlist_leaders.html b/phpBB/styles/prosilver/template/memberlist_leaders.html
index 1a63793bc3..bce1a69619 100644
--- a/phpBB/styles/prosilver/template/memberlist_leaders.html
+++ b/phpBB/styles/prosilver/template/memberlist_leaders.html
@@ -5,7 +5,7 @@
diff --git a/tests/template/template_inheritance_test.php b/tests/template/template_inheritance_test.php
index 3a03de6427..6987ae6c73 100644
--- a/tests/template/template_inheritance_test.php
+++ b/tests/template/template_inheritance_test.php
@@ -62,15 +62,18 @@ class phpbb_template_template_inheritance_test extends phpbb_template_template_t
$this->run_template($file, $vars, $block_vars, $destroy, $expected, $cache_file);
}
- protected function setup_engine()
+ protected function setup_engine(array $new_config = array())
{
- global $phpbb_root_path, $phpEx, $config, $user;
+ global $phpbb_root_path, $phpEx, $user;
+
+ $defaults = $this->config_defaults();
+ $config = new phpbb_config(array_merge($defaults, $new_config));
$this->template_path = dirname(__FILE__) . '/templates';
$this->parent_template_path = dirname(__FILE__) . '/parent_templates';
$this->template_locator = new phpbb_template_locator();
$this->template_provider = new phpbb_template_path_provider();
$this->template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $this->template_locator, $this->template_provider);
- $this->template->set_custom_template($this->template_path, 'tests', $this->parent_template_path);
+ $this->template->set_custom_template($this->template_path, 'tests', $this->parent_template_path, 'parent');
}
}
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 419c90bd2a..76b1af68d8 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -347,6 +347,42 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
$this->assertEquals($expected, $this->display('container'), "Testing assign_display($file)");
}
+ public function test_append_var_without_assign_var()
+ {
+ $this->template->set_filenames(array(
+ 'append_var' => 'variable.html'
+ ));
+
+ $items = array('This ', 'is ', 'a ', 'test');
+ $expecting = implode('', $items);
+
+ foreach ($items as $word)
+ {
+ $this->template->append_var('VARIABLE', $word);
+ }
+
+ $this->assertEquals($expecting, $this->display('append_var'));
+ }
+
+ public function test_append_var_with_assign_var()
+ {
+ $this->template->set_filenames(array(
+ 'append_var' => 'variable.html'
+ ));
+
+ $start = 'This ';
+ $items = array('is ', 'a ', 'test');
+ $expecting = $start . implode('', $items);
+
+ $this->template->assign_var('VARIABLE', $start);
+ foreach ($items as $word)
+ {
+ $this->template->append_var('VARIABLE', $word);
+ }
+
+ $this->assertEquals($expecting, $this->display('append_var'));
+ }
+
public function test_php()
{
$this->setup_engine(array('tpl_allow_php' => true));
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
index a78837516b..5b60785fee 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -46,15 +46,20 @@ class phpbb_template_template_test_case extends phpbb_test_case
return str_replace("\n\n", "\n", implode("\n", array_map('trim', explode("\n", trim($result)))));
}
- protected function setup_engine(array $new_config = array())
+ protected function config_defaults()
{
- global $phpbb_root_path, $phpEx, $user;
-
$defaults = array(
'load_tplcompile' => true,
'tpl_allow_php' => false,
);
+ return $defaults;
+ }
+ protected function setup_engine(array $new_config = array())
+ {
+ global $phpbb_root_path, $phpEx, $user;
+
+ $defaults = $this->config_defaults();
$config = new phpbb_config(array_merge($defaults, $new_config));
$this->template_path = dirname(__FILE__) . '/templates';
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index ca52d24b7e..b5e6f7e377 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -102,8 +102,7 @@ class phpbb_functional_test_case extends phpbb_test_case
'admin_name' => 'admin',
'admin_pass1' => 'admin',
'admin_pass2' => 'admin',
- 'board_email1' => 'nobody@example.com',
- 'board_email2' => 'nobody@example.com',
+ 'board_email' => 'nobody@example.com',
));
$parseURL = parse_url(self::$config['phpbb_functional_url']);
diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml
new file mode 100644
index 0000000000..79215c8de1
--- /dev/null
+++ b/travis/phpunit-mysql-travis.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ ../tests/
+
+
+
+
+
+ slow
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml
new file mode 100644
index 0000000000..02db76ae78
--- /dev/null
+++ b/travis/phpunit-postgres-travis.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ ../tests/
+
+
+
+
+
+ slow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+