diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2011-08-21 14:12:08 +0200 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2011-08-21 14:12:08 +0200 |
| commit | 4253a73e81fd10b8018885e2268726e397a6369e (patch) | |
| tree | ddb63565aed7d839f94c7ebeda57773427ebe12b | |
| parent | 19ee2d2d40a0793707d14abb33cf800cb5a145fe (diff) | |
| parent | 9f9e4ad3d8d9b88be01427739088020d9e64164b (diff) | |
| download | forums-4253a73e81fd10b8018885e2268726e397a6369e.tar forums-4253a73e81fd10b8018885e2268726e397a6369e.tar.gz forums-4253a73e81fd10b8018885e2268726e397a6369e.tar.bz2 forums-4253a73e81fd10b8018885e2268726e397a6369e.tar.xz forums-4253a73e81fd10b8018885e2268726e397a6369e.zip | |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10309] Update .gitignore and move .gitkeep.
[ticket/10309] Coding guidelines fix.
[ticket/10309] Write unicode data to tests/tmp.
Conflicts:
.gitignore
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | tests/tmp/.gitkeep (renamed from tests/utf/data/.gitkeep) | 0 | ||||
| -rw-r--r-- | tests/utf/normalizer_test.php | 11 |
3 files changed, 8 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore index 885e37f194..1ac01d9b2d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,4 @@ /phpBB/store/* /tests/phpbb_unit_tests.sqlite2 /tests/test_config.php -/tests/tmp -/tests/utf/data/*.txt +/tests/tmp/* diff --git a/tests/utf/data/.gitkeep b/tests/tmp/.gitkeep index e69de29bb2..e69de29bb2 100644 --- a/tests/utf/data/.gitkeep +++ b/tests/tmp/.gitkeep diff --git a/tests/utf/normalizer_test.php b/tests/utf/normalizer_test.php index f78dba8004..a0ba470416 100644 --- a/tests/utf/normalizer_test.php +++ b/tests/utf/normalizer_test.php @@ -14,10 +14,13 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_normalizer.php'; */ class phpbb_utf_normalizer_test extends phpbb_test_case { + static private $data_dir; + static public function setUpBeforeClass() { - self::download('http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt', dirname(__FILE__).'/data'); - self::download('http://www.unicode.org/Public/UNIDATA/UnicodeData.txt', dirname(__FILE__).'/data'); + self::$data_dir = dirname(__file__) . '/../tmp'; + self::download('http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt', self::$data_dir); + self::download('http://www.unicode.org/Public/UNIDATA/UnicodeData.txt', self::$data_dir); } public function test_normalizer() @@ -62,7 +65,7 @@ class phpbb_utf_normalizer_test extends phpbb_test_case $tested_chars = array(); - $fp = fopen(dirname(__FILE__).'/data/NormalizationTest.txt', 'rb'); + $fp = fopen(self::$data_dir . '/NormalizationTest.txt', 'rb'); while (!feof($fp)) { $line = fgets($fp); @@ -117,7 +120,7 @@ class phpbb_utf_normalizer_test extends phpbb_test_case */ public function test_invariants(array $tested_chars) { - $fp = fopen(dirname(__FILE__).'/data/UnicodeData.txt', 'rb'); + $fp = fopen(self::$data_dir . '/UnicodeData.txt', 'rb'); while (!feof($fp)) { |
