From 97d4f168f588288df071e4a8b107b9ffb8b0355f Mon Sep 17 00:00:00 2001 From: Richard Foote Date: Mon, 19 Mar 2012 15:08:28 -0400 Subject: [PATCH 01/10] [ticket/10675] Add disk full language string when posting attachments Add language string visible by admins only for when the disk does not have enough free space to upload attachments. PHPBB3-10675 --- phpBB/includes/functions_posting.php | 9 ++++++++- phpBB/language/en/posting.php | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index f920be9c4b..b40fd67927 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -497,7 +497,14 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage { if ($free_space <= $file->get('filesize')) { - $filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED']; + if ($auth->acl_get('a_')) + { + $filedata['error'][] = $user->lang['ATTACH_DISK_FULL']; + } + else + { + $filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED']; + } $filedata['post_attach'] = false; $file->remove(); diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index f8d265dddd..dd0ba7fc6d 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -42,6 +42,7 @@ $lang = array_merge($lang, array( 'ADD_POLL' => 'Poll creation', 'ADD_POLL_EXPLAIN' => 'If you do not want to add a poll to your topic leave the fields blank.', 'ALREADY_DELETED' => 'Sorry but this message is already deleted.', + 'ATTACH_DISK_FULL' => 'There is not enough free disk space to post this attachment', 'ATTACH_QUOTA_REACHED' => 'Sorry, the board attachment quota has been reached.', 'ATTACH_SIG' => 'Attach a signature (signatures can be altered via the UCP)', From 28fac327426de08b7a5476b2417fef4f03be6908 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 29 Mar 2012 15:51:06 +0100 Subject: [PATCH 02/10] [ticket/10705] Change WARNINGS_ZERO_TOTAL in en language Located the WARNINGS_ZERO_TOTAL in the language and replaced it with NO_WARNINGS PHPBB3-10705 --- phpBB/language/en/mcp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php index 664365b1ec..d57036cc0e 100644 --- a/phpBB/language/en/mcp.php +++ b/phpBB/language/en/mcp.php @@ -388,7 +388,7 @@ $lang = array_merge($lang, array( 'WARNING_PM_BODY' => 'The following is a warning which has been issued to you by an administrator or moderator of this site.[quote]%s[/quote]', 'WARNING_PM_SUBJECT' => 'Board warning issued', 'WARNING_POST_DEFAULT' => 'This is a warning regarding the following post made by you: %s .', - 'WARNINGS_ZERO_TOTAL' => 'No warnings exist.', + 'NO_WARNINGS' => 'No warnings exist.', 'YOU_SELECTED_TOPIC' => 'You selected topic number %d: %s.', From d0e7b38aecbd5f357401297c8d57824a0504e9b6 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 29 Mar 2012 15:52:06 +0100 Subject: [PATCH 03/10] [ticket/10705] Change WARNINGS_ZERO_TOTAL in prosilver Located the L_WARNINGS_ZERO_TOTAL in prosilver and replaced it with L_NO_WARNINGS PHPBB3-10705 --- phpBB/styles/prosilver/template/mcp_warn_front.html | 4 ++-- phpBB/styles/prosilver/template/mcp_warn_list.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/styles/prosilver/template/mcp_warn_front.html b/phpBB/styles/prosilver/template/mcp_warn_front.html index 8f42e28cc0..2f7d939b16 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_front.html +++ b/phpBB/styles/prosilver/template/mcp_warn_front.html @@ -55,7 +55,7 @@ -

{L_WARNINGS_ZERO_TOTAL}

+

{L_NO_WARNINGS}

@@ -88,7 +88,7 @@ -

{L_WARNINGS_ZERO_TOTAL}

+

{L_NO_WARNINGS}

diff --git a/phpBB/styles/prosilver/template/mcp_warn_list.html b/phpBB/styles/prosilver/template/mcp_warn_list.html index d9c0bce088..5e43903f11 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_list.html +++ b/phpBB/styles/prosilver/template/mcp_warn_list.html @@ -53,7 +53,7 @@ -

{L_WARNINGS_ZERO_TOTAL}

+

{L_NO_WARNINGS}

From 56629d8e3c80cd490b8ec39d4fa102d0303f9a4b Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 29 Mar 2012 15:52:28 +0100 Subject: [PATCH 04/10] [ticket/10705] Change WARNINGS_ZERO_TOTAL in subsilver2 Located the L_WARNINGS_ZERO_TOTAL in subsilver2 and replaced it with L_NO_WARNINGS PHPBB3-10705 --- phpBB/styles/subsilver2/template/mcp_warn_front.html | 4 ++-- phpBB/styles/subsilver2/template/mcp_warn_list.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/styles/subsilver2/template/mcp_warn_front.html b/phpBB/styles/subsilver2/template/mcp_warn_front.html index 417355d537..020a79f419 100644 --- a/phpBB/styles/subsilver2/template/mcp_warn_front.html +++ b/phpBB/styles/subsilver2/template/mcp_warn_front.html @@ -38,7 +38,7 @@ - {L_WARNINGS_ZERO_TOTAL} + {L_NO_WARNINGS} @@ -64,7 +64,7 @@ - {L_WARNINGS_ZERO_TOTAL} + {L_NO_WARNINGS} diff --git a/phpBB/styles/subsilver2/template/mcp_warn_list.html b/phpBB/styles/subsilver2/template/mcp_warn_list.html index 6ed0b68bd5..0b0cfa8a45 100644 --- a/phpBB/styles/subsilver2/template/mcp_warn_list.html +++ b/phpBB/styles/subsilver2/template/mcp_warn_list.html @@ -21,7 +21,7 @@ - {L_WARNINGS_ZERO_TOTAL} + {L_NO_WARNINGS} From 9391d423c05818e5f18ddbe051e1713c835f4404 Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Fri, 30 Mar 2012 19:04:20 +0100 Subject: [PATCH 05/10] [feature/event-dispatcher] Adding composer.phar to .gitignore for olympus To keep the .gitignore's the same. PHPBB3-9550 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e6e017f85e..de26e1dd1e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /phpBB/cache/*.html /phpBB/cache/*.php /phpBB/cache/queue.php.lock +/phpBB/composer.phar /phpBB/config.php /phpBB/config_dev.php /phpBB/config_test.php From b8b342be2d238616b96ace9acbe8af2e18ba1e7a Mon Sep 17 00:00:00 2001 From: Richard Foote Date: Sat, 31 Mar 2012 12:46:44 -0400 Subject: [PATCH 06/10] [Ticket/10675] Correct language string ATTACH_DISK_FULL Add period to ATTACH_DISK_FULL language string PHPBB3-10675 --- phpBB/language/en/posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index dd0ba7fc6d..24f3204c57 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -42,7 +42,7 @@ $lang = array_merge($lang, array( 'ADD_POLL' => 'Poll creation', 'ADD_POLL_EXPLAIN' => 'If you do not want to add a poll to your topic leave the fields blank.', 'ALREADY_DELETED' => 'Sorry but this message is already deleted.', - 'ATTACH_DISK_FULL' => 'There is not enough free disk space to post this attachment', + 'ATTACH_DISK_FULL' => 'There is not enough free disk space to post this attachment.', 'ATTACH_QUOTA_REACHED' => 'Sorry, the board attachment quota has been reached.', 'ATTACH_SIG' => 'Attach a signature (signatures can be altered via the UCP)', From e7cf4bfb2ed2b549e567c7237df799b6af0977ae Mon Sep 17 00:00:00 2001 From: Hari Sankar R Date: Sun, 1 Apr 2012 18:25:50 +0530 Subject: [PATCH 07/10] [ticket/10731] Fixed addquote() to work on opera browser. In opera, window.getSelection() returned incorrect values, should be using document.getSelection() instead. Fixed in prosilver and subsilver2 templates. PHPBB3-10731 --- phpBB/styles/prosilver/template/editor.js | 2 +- phpBB/styles/subsilver2/template/editor.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js index 2c41b543b5..c16b0ef703 100644 --- a/phpBB/styles/prosilver/template/editor.js +++ b/phpBB/styles/prosilver/template/editor.js @@ -219,7 +219,7 @@ function addquote(post_id, username, l_wrote) // Get text selection - not only the post content :( // IE9 must use the document.selection method but has the *.getSelection so we just force no IE - if (window.getSelection && !is_ie) + if (window.getSelection && !is_ie && !window.opera) { theSelection = window.getSelection().toString(); } diff --git a/phpBB/styles/subsilver2/template/editor.js b/phpBB/styles/subsilver2/template/editor.js index b47583ec75..151cf53ff1 100644 --- a/phpBB/styles/subsilver2/template/editor.js +++ b/phpBB/styles/subsilver2/template/editor.js @@ -221,7 +221,7 @@ function addquote(post_id, username, l_wrote) // Get text selection - not only the post content :( // IE9 must use the document.selection method but has the *.getSelection so we just force no IE - if (window.getSelection && !is_ie) + if (window.getSelection && !is_ie && !window.opera) { theSelection = window.getSelection().toString(); } From b1b530f92cca7eb115e096ea8901133d421771d2 Mon Sep 17 00:00:00 2001 From: Hari Sankar R Date: Sun, 1 Apr 2012 18:25:50 +0530 Subject: [PATCH 08/10] [ticket/10731] Fixed addquote() to work on opera browser. In opera, window.getSelection() returned incorrect values, should be using document.getSelection() instead. Fixed in prosilver and subsilver2 templates. PHPBB3-10731 --- phpBB/styles/prosilver/template/editor.js | 4 ++-- phpBB/styles/subsilver2/template/editor.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js index cfdb54f54b..c16b0ef703 100644 --- a/phpBB/styles/prosilver/template/editor.js +++ b/phpBB/styles/prosilver/template/editor.js @@ -219,7 +219,7 @@ function addquote(post_id, username, l_wrote) // Get text selection - not only the post content :( // IE9 must use the document.selection method but has the *.getSelection so we just force no IE - if (window.getSelection && !is_ie) + if (window.getSelection && !is_ie && !window.opera) { theSelection = window.getSelection().toString(); } @@ -456,4 +456,4 @@ function getCaretPosition(txtarea) } return caretPos; -} \ No newline at end of file +} diff --git a/phpBB/styles/subsilver2/template/editor.js b/phpBB/styles/subsilver2/template/editor.js index 7cc5de9034..151cf53ff1 100644 --- a/phpBB/styles/subsilver2/template/editor.js +++ b/phpBB/styles/subsilver2/template/editor.js @@ -221,7 +221,7 @@ function addquote(post_id, username, l_wrote) // Get text selection - not only the post content :( // IE9 must use the document.selection method but has the *.getSelection so we just force no IE - if (window.getSelection && !is_ie) + if (window.getSelection && !is_ie && !window.opera) { theSelection = window.getSelection().toString(); } @@ -459,4 +459,4 @@ function getCaretPosition(txtarea) } return caretPos; -} \ No newline at end of file +} From f5bac7686b1678dbd33eddd368d845237bb18943 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 1 Apr 2012 19:14:53 +0300 Subject: [PATCH 09/10] [ticket/10733] Removing static from data providers Removing static from data provider functions PHPBB3-10733 --- tests/dbal/select_test.php | 14 +++++++------- tests/dbal/write_test.php | 4 ++-- tests/group_positions/group_positions_test.php | 14 +++++++------- tests/request/request_var_test.php | 4 ++-- tests/security/extract_current_page_test.php | 2 +- tests/security/redirect_test.php | 2 +- tests/template/template_inheritance_test.php | 2 +- tests/template/template_locate_test.php | 2 +- tests/template/template_test.php | 4 ++-- tests/text_processing/make_clickable_test.php | 2 +- tests/utf/utf8_clean_string_test.php | 2 +- 11 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tests/dbal/select_test.php b/tests/dbal/select_test.php index 21b12777dc..cc213f09bc 100644 --- a/tests/dbal/select_test.php +++ b/tests/dbal/select_test.php @@ -17,7 +17,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/three_users.xml'); } - public static function return_on_error_select_data() + public function return_on_error_select_data() { return array( array('phpbb_users', "username_clean = 'bertie'", array(array('username_clean' => 'bertie'))), @@ -44,7 +44,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case $this->assertEquals($expected, $db->sql_fetchrowset($result)); } - public static function fetchrow_data() + public function fetchrow_data() { return array( array('', array(array('username_clean' => 'barfoo'), @@ -95,7 +95,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case $db->sql_freeresult($result); } - public static function fetchfield_data() + public function fetchfield_data() { return array( array('', array('barfoo', 'foobar', 'bertie')), @@ -125,7 +125,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case $this->assertEquals($expected, $ary); } - public static function query_limit_data() + public function query_limit_data() { return array( array(0, 0, array(array('username_clean' => 'barfoo'), @@ -166,7 +166,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case $this->assertEquals($expected, $ary); } - public static function like_expression_data() + public function like_expression_data() { // * = any_char; # = one_char return array( @@ -203,7 +203,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case $db->sql_freeresult($result); } - public static function in_set_data() + public function in_set_data() { return array( array('user_id', 3, false, false, array(array('username_clean' => 'bertie'))), @@ -277,7 +277,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case $db->sql_freeresult($result); } - public static function build_array_data() + public function build_array_data() { return array( array(array('username_clean' => 'barfoo'), array(array('username_clean' => 'barfoo'))), diff --git a/tests/dbal/write_test.php b/tests/dbal/write_test.php index 596c50a220..987161a831 100644 --- a/tests/dbal/write_test.php +++ b/tests/dbal/write_test.php @@ -16,7 +16,7 @@ class phpbb_dbal_write_test extends phpbb_database_test_case return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml'); } - public static function build_array_insert_data() + public function build_array_insert_data() { return array( array(array( @@ -104,7 +104,7 @@ class phpbb_dbal_write_test extends phpbb_database_test_case $db->sql_freeresult($result); } - public static function update_data() + public function update_data() { return array( array( diff --git a/tests/group_positions/group_positions_test.php b/tests/group_positions/group_positions_test.php index fd9f57e78f..c17e25511b 100644 --- a/tests/group_positions/group_positions_test.php +++ b/tests/group_positions/group_positions_test.php @@ -15,7 +15,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/group_positions.xml'); } - public static function get_group_value_data() + public function get_group_value_data() { return array( array('teampage', 1, 0), @@ -38,7 +38,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case $this->assertEquals($expected, $test_class->get_group_value($group_id)); } - public static function get_group_count_data() + public function get_group_count_data() { return array( array('teampage', 2), @@ -59,7 +59,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case $this->assertEquals($expected, $test_class->get_group_count()); } - public static function add_group_data() + public function add_group_data() { return array( array('teampage', 1, array( @@ -93,7 +93,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case $this->assertEquals($expected, $db->sql_fetchrowset($result)); } - public static function delete_group_data() + public function delete_group_data() { return array( array('teampage', 1, false, array( @@ -147,7 +147,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case $this->assertEquals($expected, $db->sql_fetchrowset($result)); } - public static function move_up_data() + public function move_up_data() { return array( array('teampage', 1, array( @@ -186,7 +186,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case $this->assertEquals($expected, $db->sql_fetchrowset($result)); } - public static function move_down_data() + public function move_down_data() { return array( array('teampage', 1, array( @@ -225,7 +225,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case $this->assertEquals($expected, $db->sql_fetchrowset($result)); } - public static function move_data() + public function move_data() { return array( array('teampage', 1, 1, array( diff --git a/tests/request/request_var_test.php b/tests/request/request_var_test.php index 1fa0afae13..0e85d4694b 100644 --- a/tests/request/request_var_test.php +++ b/tests/request/request_var_test.php @@ -112,7 +112,7 @@ class phpbb_request_var_test extends phpbb_test_case $this->assertEquals($expected, $result, 'Testing deep access to multidimensional input arrays: ' . $path); } - public static function deep_access() + public function deep_access() { return array( // array(path, default, expected result) @@ -123,7 +123,7 @@ class phpbb_request_var_test extends phpbb_test_case ); } - public static function request_variables() + public function request_variables() { return array( // strings diff --git a/tests/security/extract_current_page_test.php b/tests/security/extract_current_page_test.php index b4a475ffb3..d77cbbcaf3 100644 --- a/tests/security/extract_current_page_test.php +++ b/tests/security/extract_current_page_test.php @@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_security_extract_current_page_test extends phpbb_security_test_base { - public static function security_variables() + public function security_variables() { return array( array('http://localhost/phpBB/index.php', 'mark=forums&x=">', 'mark=forums&x=%22%3E%3Cscript%3Ealert(/XSS/);%3C/script%3E'), diff --git a/tests/security/redirect_test.php b/tests/security/redirect_test.php index da318209e2..1325466137 100644 --- a/tests/security/redirect_test.php +++ b/tests/security/redirect_test.php @@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_security_redirect_test extends phpbb_security_test_base { - public static function provider() + public function provider() { // array(Input -> redirect(), expected triggered error (else false), expected returned result url (else false)) return array( diff --git a/tests/template/template_inheritance_test.php b/tests/template/template_inheritance_test.php index 7348da9a4a..a76658701a 100644 --- a/tests/template/template_inheritance_test.php +++ b/tests/template/template_inheritance_test.php @@ -14,7 +14,7 @@ class phpbb_template_template_inheritance_test extends phpbb_template_template_t /** * @todo put test data into templates/xyz.test */ - public static function template_data() + public function template_data() { return array( // First element of the array is test name - keep them distinct diff --git a/tests/template/template_locate_test.php b/tests/template/template_locate_test.php index 591a6afe0c..8edbd6a008 100644 --- a/tests/template/template_locate_test.php +++ b/tests/template/template_locate_test.php @@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/template_test_case.php'; class phpbb_template_template_locate_test extends phpbb_template_template_test_case { - public static function template_data() + public function template_data() { return array( // First element of the array is test name - keep them distinct diff --git a/tests/template/template_test.php b/tests/template/template_test.php index edf621e16c..739bbe9387 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -15,7 +15,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case /** * @todo put test data into templates/xyz.test */ - public static function template_data() + public function template_data() { return array( /* @@ -394,7 +394,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case $this->run_template('php.html', array(), array(), array(), 'test', $cache_file); } - public static function alter_block_array_data() + public function alter_block_array_data() { return array( array( diff --git a/tests/text_processing/make_clickable_test.php b/tests/text_processing/make_clickable_test.php index 8697907311..d94fac2ae4 100644 --- a/tests/text_processing/make_clickable_test.php +++ b/tests/text_processing/make_clickable_test.php @@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php'; class phpbb_text_processing_make_clickable_test extends phpbb_test_case { - public static function make_clickable_data() + public function make_clickable_data() { // value => whether it should work $prefix_texts = array( diff --git a/tests/utf/utf8_clean_string_test.php b/tests/utf/utf8_clean_string_test.php index 70bd549d5b..ae11e00fbd 100644 --- a/tests/utf/utf8_clean_string_test.php +++ b/tests/utf/utf8_clean_string_test.php @@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php'; class phpbb_utf_utf8_clean_string_test extends phpbb_test_case { - public static function cleanable_strings() + public function cleanable_strings() { return array( array('MiXed CaSe', 'mixed case', 'Checking case folding'), From eaba2ed9ca6025358de0432bb569cfb2e3ca6985 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 1 Apr 2012 19:20:42 +0300 Subject: [PATCH 10/10] [ticket/10733] Fixing test Changing expected and result in locator test PHPBB3-10733 --- tests/template/template_locate_test.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/template/template_locate_test.php b/tests/template/template_locate_test.php index 8edbd6a008..89a4ae6fb1 100644 --- a/tests/template/template_locate_test.php +++ b/tests/template/template_locate_test.php @@ -17,38 +17,38 @@ class phpbb_template_template_locate_test extends phpbb_template_template_test_c // First element of the array is test name - keep them distinct array( 'simple inheritance - only parent template exists', + dirname(__FILE__) . '/parent_templates/parent_only.html', 'parent_only.html', false, true, - dirname(__FILE__) . '/parent_templates/parent_only.html', ), array( 'simple inheritance - only child template exists', + dirname(__FILE__) . '/templates/child_only.html', 'child_only.html', false, true, - dirname(__FILE__) . '/templates/child_only.html', ), array( 'simple inheritance - both parent and child templates exist', + dirname(__FILE__) . '/templates/parent_and_child.html', 'parent_and_child.html', false, true, - dirname(__FILE__) . '/templates/parent_and_child.html', ), array( 'find first template - only child template exists in main style', + 'child_only.html', array('parent_only.html', 'child_only.html'), false, false, - 'child_only.html', ), array( 'find first template - both templates exist in main style', + 'parent_and_child.html', array('parent_and_child.html', 'child_only.html'), false, false, - 'parent_and_child.html', ), ); } @@ -56,14 +56,14 @@ class phpbb_template_template_locate_test extends phpbb_template_template_test_c /** * @dataProvider template_data */ - public function test_template($name, $files, $return_default, $return_full_path, $expected) + public function test_template($name, $expected, $files, $return_default, $return_full_path) { // Reset the engine state $this->setup_engine(); // Locate template $result = $this->template->locate($files, $return_default, $return_full_path); - $this->assertEquals($result, $expected); + $this->assertSame($expected, $result); } protected function setup_engine(array $new_config = array())