From d5deec90acfb2ffe1ed5640b93f5ebd1671d9283 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 7 Oct 2015 11:22:14 +0200 Subject: [PATCH] Fix merge, removing legacy TranslationSyncStatusTest --- .../Tests/TranslationSyncStatusTest.php | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 src/Symfony/Component/Security/Tests/TranslationSyncStatusTest.php diff --git a/src/Symfony/Component/Security/Tests/TranslationSyncStatusTest.php b/src/Symfony/Component/Security/Tests/TranslationSyncStatusTest.php deleted file mode 100644 index 4b72d41d5a..0000000000 --- a/src/Symfony/Component/Security/Tests/TranslationSyncStatusTest.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Tests; - -use Symfony\Component\Finder\Finder; - -class TranslationSyncStatusTest extends \PHPUnit_Framework_TestCase -{ - /** - * @dataProvider getTranslationDirectoriesData - */ - public function testTranslationFileIsNotMissingInCore($dir1, $dir2) - { - $finder = new Finder(); - $files = $finder->in($dir1)->files(); - - foreach ($files as $file) { - $this->assertFileExists($dir2.'/'.$file->getFilename(), 'Missing file '.$file->getFilename().' in directory '.$dir2); - } - } - - public function getTranslationDirectoriesData() - { - $legacyTranslationsDir = $this->getLegacyTranslationsDirectory(); - $coreTranslationsDir = $this->getCoreTranslationsDirectory(); - - return array( - 'file-not-missing-in-core' => array($legacyTranslationsDir, $coreTranslationsDir), - 'file-not-added-in-core' => array($coreTranslationsDir, $legacyTranslationsDir), - ); - } - - public function testFileContentsAreEqual() - { - $finder = new Finder(); - $files = $finder->in($this->getLegacyTranslationsDirectory())->files(); - - foreach ($files as $file) { - $coreFile = $this->getCoreTranslationsDirectory().'/'.$file->getFilename(); - - $this->assertFileEquals($file->getRealPath(), $coreFile, $file.' and '.$coreFile.' have equal content.'); - } - } - - private function getLegacyTranslationsDirectory() - { - return __DIR__.'/../Resources/translations'; - } - - private function getCoreTranslationsDirectory() - { - return __DIR__.'/../Core/Resources/translations'; - } -}