diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-11-11 09:40:50 -0800 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-11-11 09:40:50 -0800 |
commit | d69f35d4507be98c384a0bb6232ebe08c36864c0 (patch) | |
tree | 37819371cfbcac3b4c836a7b035a947d0b4c9b07 /tests | |
parent | cfb0a4103083c4787beca30671d16eede92bd571 (diff) | |
parent | 95348c8f6d64302d2d525f2ba1a9408f1510144b (diff) | |
download | forums-d69f35d4507be98c384a0bb6232ebe08c36864c0.tar forums-d69f35d4507be98c384a0bb6232ebe08c36864c0.tar.gz forums-d69f35d4507be98c384a0bb6232ebe08c36864c0.tar.bz2 forums-d69f35d4507be98c384a0bb6232ebe08c36864c0.tar.xz forums-d69f35d4507be98c384a0bb6232ebe08c36864c0.zip |
Merge pull request #1853 from nickvergessen/ticket/11927
[ticket/11927] Correctly add new files on update
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functions_install/ignore_new_file_on_update_test.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/functions_install/ignore_new_file_on_update_test.php b/tests/functions_install/ignore_new_file_on_update_test.php new file mode 100644 index 0000000000..ae1dde96f7 --- /dev/null +++ b/tests/functions_install/ignore_new_file_on_update_test.php @@ -0,0 +1,39 @@ +<?php +/** +* +* @package testing +* @copyright (c) 2013 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +require_once dirname(__FILE__) . '/../../phpBB/includes/functions_install.php'; + +class phpbb_functions_install_ignore_new_file_on_update_test extends phpbb_test_case +{ + static public function ignore_new_file_on_update_data() + { + return array( + array('willneverexist.php', false), + array('includes/dirwillneverexist/newfile.php', false), + + array('language/en/email/short/bookmark.txt', false), + array('language/languagewillneverexist/email/short/bookmark.txt', true), + + array('styles/prosilver/template/bbcode.html', false), + array('styles/stylewillneverexist/template/bbcode.html', true), + + array('styles/prosilver/theme/en/icon_user_online.gif', false), + array('styles/prosilver/theme/languagewillneverexist/icon_user_online.gif', true), + ); + } + + /** + * @dataProvider ignore_new_file_on_update_data + */ + public function test_ignore_new_file_on_update($file, $expected) + { + global $phpbb_root_path; + $this->assertEquals($expected, phpbb_ignore_new_file_on_update($phpbb_root_path, $file)); + } +} |