diff options
| author | Matt Friedman <maf675@gmail.com> | 2013-12-12 10:28:10 -0800 |
|---|---|---|
| committer | Matt Friedman <maf675@gmail.com> | 2013-12-12 10:28:10 -0800 |
| commit | a59bbeed2dd82b316f1e2f9ad484b978ef2a541c (patch) | |
| tree | f3d667b7711b44fa56f6d575b8ae2bc072682d23 /tests/functions_install | |
| parent | 2ae6f216f66466a1851f52cbc9839e3405525981 (diff) | |
| parent | da6ced59d9632fec5103ce4bea86eb6bcceb5d1e (diff) | |
| download | forums-a59bbeed2dd82b316f1e2f9ad484b978ef2a541c.tar forums-a59bbeed2dd82b316f1e2f9ad484b978ef2a541c.tar.gz forums-a59bbeed2dd82b316f1e2f9ad484b978ef2a541c.tar.bz2 forums-a59bbeed2dd82b316f1e2f9ad484b978ef2a541c.tar.xz forums-a59bbeed2dd82b316f1e2f9ad484b978ef2a541c.zip | |
[ticket/11966] Merge branch 'develop' into ticket/11966
PHPBB3-11966
Diffstat (limited to 'tests/functions_install')
| -rw-r--r-- | tests/functions_install/ignore_new_file_on_update_test.php | 41 |
1 files changed, 41 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..703da4e435 --- /dev/null +++ b/tests/functions_install/ignore_new_file_on_update_test.php @@ -0,0 +1,41 @@ +<?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), + + array('styles/prosilver/theme/imageset.css', false), + ); + } + + /** + * @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)); + } +} |
