diff options
author | Javier Eguiluz <javier.eguiluz@gmail.com> | 2016-02-23 12:42:51 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2016-02-23 19:12:35 +0100 |
commit | 9839231d5d543ec697d1f5643d14af9bca31dd00 (patch) | |
tree | c792c87425f8afe6b16a02454d5be84879128060 | |
parent | 119c9bc1d03fb91b774f7ee279d628bdb6301bdc (diff) | |
download | symfony-security-9839231d5d543ec697d1f5643d14af9bca31dd00.zip symfony-security-9839231d5d543ec697d1f5643d14af9bca31dd00.tar.gz symfony-security-9839231d5d543ec697d1f5643d14af9bca31dd00.tar.bz2 |
Validate XLIFF translation filesv2.3.38
-rw-r--r-- | Tests/Resources/TranslationFilesTest.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Tests/Resources/TranslationFilesTest.php b/Tests/Resources/TranslationFilesTest.php new file mode 100644 index 0000000..341ec87 --- /dev/null +++ b/Tests/Resources/TranslationFilesTest.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Tests\Resources; + +class TranslationFilesTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider provideTranslationFiles + */ + public function testTranslationFileIsValid($filePath) + { + \PHPUnit_Util_XML::loadfile($filePath, false, false, true); + } + + public function provideTranslationFiles() + { + return array_map( + function ($filePath) { return (array) $filePath; }, + glob(dirname(dirname(__DIR__)).'/Resources/translations/*.xlf') + ); + } +} |