From 5114edcafe440df04357d789c03b390d6da48db5 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 1 May 2012 17:41:46 +0300 Subject: [PATCH] [ticket/10800] Changing html to js for includejs tests Changing .html to .js files for includejs tests PHPBB3-10800 --- tests/template/parent_templates/parent_and_child.js | 1 + tests/template/parent_templates/parent_only.js | 1 + tests/template/template_includejs_test.php | 8 ++++---- tests/template/templates/child_only.js | 1 + tests/template/templates/includejs.html | 4 ++-- tests/template/templates/parent_and_child.js | 1 + 6 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 tests/template/parent_templates/parent_and_child.js create mode 100644 tests/template/parent_templates/parent_only.js create mode 100644 tests/template/templates/child_only.js create mode 100644 tests/template/templates/parent_and_child.js diff --git a/tests/template/parent_templates/parent_and_child.js b/tests/template/parent_templates/parent_and_child.js new file mode 100644 index 0000000000..6d9bb163bf --- /dev/null +++ b/tests/template/parent_templates/parent_and_child.js @@ -0,0 +1 @@ +// JavaScript file in a parent style. diff --git a/tests/template/parent_templates/parent_only.js b/tests/template/parent_templates/parent_only.js new file mode 100644 index 0000000000..9c3007d83f --- /dev/null +++ b/tests/template/parent_templates/parent_only.js @@ -0,0 +1 @@ +// JavaScript file only in parent style. diff --git a/tests/template/template_includejs_test.php b/tests/template/template_includejs_test.php index d80254072b..a8f9a9037f 100644 --- a/tests/template/template_includejs_test.php +++ b/tests/template/template_includejs_test.php @@ -18,13 +18,13 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes // Prepare correct result $scripts = array( - '', - '', - '' + '', + '', + '' ); // Run test $cache_file = $this->template->cachepath . 'includejs.html.php'; - $this->run_template('includejs.html', array('PARENT' => 'parent_only.html'), array(), array(), implode('', $scripts), $cache_file); + $this->run_template('includejs.html', array('PARENT' => 'parent_only.js'), array(), array(), implode('', $scripts), $cache_file); } } diff --git a/tests/template/templates/child_only.js b/tests/template/templates/child_only.js new file mode 100644 index 0000000000..542b26526c --- /dev/null +++ b/tests/template/templates/child_only.js @@ -0,0 +1 @@ +// JavaScript file only in a child style. diff --git a/tests/template/templates/includejs.html b/tests/template/templates/includejs.html index 186fc30b43..8a2587d76b 100644 --- a/tests/template/templates/includejs.html +++ b/tests/template/templates/includejs.html @@ -1,5 +1,5 @@ - + - + {SCRIPTS} \ No newline at end of file diff --git a/tests/template/templates/parent_and_child.js b/tests/template/templates/parent_and_child.js new file mode 100644 index 0000000000..d544d94d83 --- /dev/null +++ b/tests/template/templates/parent_and_child.js @@ -0,0 +1 @@ +// JavaScript file in a child style.