diff options
Diffstat (limited to 'tests/units/Locale')
-rw-r--r-- | tests/units/Locale/LocaleTest.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/units/Locale/LocaleTest.php b/tests/units/Locale/LocaleTest.php new file mode 100644 index 00000000..6cace0d5 --- /dev/null +++ b/tests/units/Locale/LocaleTest.php @@ -0,0 +1,33 @@ +<?php + +require_once __DIR__.'/../Base.php'; + +class LocaleTest extends Base +{ + public function testLocales() + { + foreach(glob('app/Locale/*') as $file) { + + $locale = require($file . '/translations.php'); + + foreach($locale as $k => $v) { + + if (strpos($k,'%B %e, %Y') !== false) { + continue; + } + + if (strpos($k,'%b %e, %Y') !== false) { + continue; + } + + foreach(array('%s', '%d') as $placeholder) { + $this->assertEquals( + substr_count($k, $placeholder), + substr_count($v, $placeholder), + 'Incorrect number of ' . $placeholder . ' in ' . basename($file) .' translation of: ' . $k + ); + } + } + } + } +} |