From fa3a4e440f6daf241772331eaac322f3e0447750 Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Mon, 11 May 2015 14:59:59 +0200 Subject: Let composer manage the vendor and lock files --- .../Tests/Catalogue/AbstractOperationTest.php | 73 --- .../Tests/Catalogue/DiffOperationTest.php | 82 --- .../Tests/Catalogue/MergeOperationTest.php | 83 --- .../Translation/Tests/Dumper/CsvFileDumperTest.php | 33 -- .../Translation/Tests/Dumper/FileDumperTest.php | 70 --- .../Tests/Dumper/IcuResFileDumperTest.php | 38 -- .../Translation/Tests/Dumper/IniFileDumperTest.php | 32 -- .../Tests/Dumper/JsonFileDumperTest.php | 36 -- .../Translation/Tests/Dumper/MoFileDumperTest.php | 31 -- .../Translation/Tests/Dumper/PhpFileDumperTest.php | 32 -- .../Translation/Tests/Dumper/PoFileDumperTest.php | 31 -- .../Translation/Tests/Dumper/QtFileDumperTest.php | 32 -- .../Tests/Dumper/XliffFileDumperTest.php | 41 -- .../Tests/Dumper/YamlFileDumperTest.php | 32 -- .../Translation/Tests/IdentityTranslatorTest.php | 95 ---- .../Component/Translation/Tests/IntervalTest.php | 48 -- .../Translation/Tests/Loader/CsvFileLoaderTest.php | 60 -- .../Tests/Loader/IcuDatFileLoaderTest.php | 68 --- .../Tests/Loader/IcuResFileLoaderTest.php | 55 -- .../Translation/Tests/Loader/IniFileLoaderTest.php | 50 -- .../Tests/Loader/JsonFileLoaderTest.php | 68 --- .../Translation/Tests/Loader/LocalizedTestCase.php | 22 - .../Translation/Tests/Loader/MoFileLoaderTest.php | 71 --- .../Translation/Tests/Loader/PhpFileLoaderTest.php | 49 -- .../Translation/Tests/Loader/PoFileLoaderTest.php | 96 ---- .../Translation/Tests/Loader/QtFileLoaderTest.php | 67 --- .../Tests/Loader/XliffFileLoaderTest.php | 142 ----- .../Tests/Loader/YamlFileLoaderTest.php | 70 --- .../Translation/Tests/LoggingTranslatorTest.php | 56 -- .../Translation/Tests/MessageCatalogueTest.php | 200 ------- .../Translation/Tests/MessageSelectorTest.php | 98 ---- .../Translation/Tests/PluralizationRulesTest.php | 123 ----- .../Translation/Tests/TranslatorCacheTest.php | 231 -------- .../Component/Translation/Tests/TranslatorTest.php | 604 --------------------- .../Tests/fixtures/empty-translation.mo | Bin 49 -> 0 bytes .../Tests/fixtures/empty-translation.po | 3 - .../Component/Translation/Tests/fixtures/empty.csv | 0 .../Component/Translation/Tests/fixtures/empty.ini | 0 .../Translation/Tests/fixtures/empty.json | 0 .../Component/Translation/Tests/fixtures/empty.mo | 0 .../Component/Translation/Tests/fixtures/empty.po | 0 .../Component/Translation/Tests/fixtures/empty.xlf | 0 .../Component/Translation/Tests/fixtures/empty.yml | 0 .../Translation/Tests/fixtures/encoding.xlf | 16 - .../Tests/fixtures/escaped-id-plurals.po | 10 - .../Translation/Tests/fixtures/escaped-id.po | 8 - .../Tests/fixtures/invalid-xml-resources.xlf | 23 - .../Translation/Tests/fixtures/malformed.json | 3 - .../Translation/Tests/fixtures/non-valid.xlf | 11 - .../Translation/Tests/fixtures/non-valid.yml | 1 - .../Translation/Tests/fixtures/plurals.mo | Bin 74 -> 0 bytes .../Translation/Tests/fixtures/plurals.po | 5 - .../Translation/Tests/fixtures/resname.xlf | 19 - .../resourcebundle/corrupted/resources.dat | 1 - .../Tests/fixtures/resourcebundle/dat/en.res | Bin 120 -> 0 bytes .../Tests/fixtures/resourcebundle/dat/en.txt | 3 - .../Tests/fixtures/resourcebundle/dat/fr.res | Bin 124 -> 0 bytes .../Tests/fixtures/resourcebundle/dat/fr.txt | 3 - .../fixtures/resourcebundle/dat/packagelist.txt | 2 - .../fixtures/resourcebundle/dat/resources.dat | Bin 352 -> 0 bytes .../Tests/fixtures/resourcebundle/res/en.res | Bin 84 -> 0 bytes .../Translation/Tests/fixtures/resources-clean.xlf | 22 - .../Translation/Tests/fixtures/resources.csv | 4 - .../Translation/Tests/fixtures/resources.ini | 1 - .../Translation/Tests/fixtures/resources.json | 3 - .../Translation/Tests/fixtures/resources.mo | Bin 52 -> 0 bytes .../Translation/Tests/fixtures/resources.php | 5 - .../Translation/Tests/fixtures/resources.po | 8 - .../Translation/Tests/fixtures/resources.ts | 10 - .../Translation/Tests/fixtures/resources.xlf | 23 - .../Translation/Tests/fixtures/resources.yml | 1 - .../Component/Translation/Tests/fixtures/valid.csv | 4 - .../Translation/Tests/fixtures/withdoctype.xlf | 12 - .../Translation/Tests/fixtures/withnote.xlf | 22 - 74 files changed, 3142 deletions(-) delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/DiffOperationTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/IntervalTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/MessageCatalogueTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/MessageSelectorTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/PluralizationRulesTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/TranslatorCacheTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/TranslatorTest.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty-translation.mo delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty-translation.po delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.csv delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.ini delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.json delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.mo delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.po delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.xlf delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.yml delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/encoding.xlf delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/escaped-id-plurals.po delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/escaped-id.po delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/invalid-xml-resources.xlf delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/malformed.json delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/non-valid.xlf delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/non-valid.yml delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/plurals.mo delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/plurals.po delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resname.xlf delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/corrupted/resources.dat delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.res delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.res delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/packagelist.txt delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/resources.dat delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/res/en.res delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources-clean.xlf delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.csv delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.ini delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.json delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.mo delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.php delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.po delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.ts delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.xlf delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.yml delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/valid.csv delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/withdoctype.xlf delete mode 100644 vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/withnote.xlf (limited to 'vendor/symfony/translation/Symfony/Component/Translation/Tests') diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php deleted file mode 100644 index 30c21af..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Catalogue; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\MessageCatalogueInterface; - -abstract class AbstractOperationTest extends \PHPUnit_Framework_TestCase -{ - public function testGetEmptyDomains() - { - $this->assertEquals( - array(), - $this->createOperation( - new MessageCatalogue('en'), - new MessageCatalogue('en') - )->getDomains() - ); - } - - public function testGetMergedDomains() - { - $this->assertEquals( - array('a', 'b', 'c'), - $this->createOperation( - new MessageCatalogue('en', array('a' => array(), 'b' => array())), - new MessageCatalogue('en', array('b' => array(), 'c' => array())) - )->getDomains() - ); - } - - public function testGetMessagesFromUnknownDomain() - { - $this->setExpectedException('InvalidArgumentException'); - $this->createOperation( - new MessageCatalogue('en'), - new MessageCatalogue('en') - )->getMessages('domain'); - } - - public function testGetEmptyMessages() - { - $this->assertEquals( - array(), - $this->createOperation( - new MessageCatalogue('en', array('a' => array())), - new MessageCatalogue('en') - )->getMessages('a') - ); - } - - public function testGetEmptyResult() - { - $this->assertEquals( - new MessageCatalogue('en'), - $this->createOperation( - new MessageCatalogue('en'), - new MessageCatalogue('en') - )->getResult() - ); - } - - abstract protected function createOperation(MessageCatalogueInterface $source, MessageCatalogueInterface $target); -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/DiffOperationTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/DiffOperationTest.php deleted file mode 100644 index 26bd582..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/DiffOperationTest.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Catalogue; - -use Symfony\Component\Translation\Catalogue\DiffOperation; -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\MessageCatalogueInterface; - -class DiffOperationTest extends AbstractOperationTest -{ - public function testGetMessagesFromSingleDomain() - { - $operation = $this->createOperation( - new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), - new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) - ); - - $this->assertEquals( - array('a' => 'old_a', 'c' => 'new_c'), - $operation->getMessages('messages') - ); - - $this->assertEquals( - array('c' => 'new_c'), - $operation->getNewMessages('messages') - ); - - $this->assertEquals( - array('b' => 'old_b'), - $operation->getObsoleteMessages('messages') - ); - } - - public function testGetResultFromSingleDomain() - { - $this->assertEquals( - new MessageCatalogue('en', array( - 'messages' => array('a' => 'old_a', 'c' => 'new_c'), - )), - $this->createOperation( - new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), - new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) - )->getResult() - ); - } - - public function testGetResultWithMetadata() - { - $leftCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))); - $leftCatalogue->setMetadata('a', 'foo', 'messages'); - $leftCatalogue->setMetadata('b', 'bar', 'messages'); - $rightCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'new_b', 'c' => 'new_c'))); - $rightCatalogue->setMetadata('b', 'baz', 'messages'); - $rightCatalogue->setMetadata('c', 'qux', 'messages'); - - $diffCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'old_b', 'c' => 'new_c'))); - $diffCatalogue->setMetadata('b', 'bar', 'messages'); - $diffCatalogue->setMetadata('c', 'qux', 'messages'); - - $this->assertEquals( - $diffCatalogue, - $this->createOperation( - $leftCatalogue, - $rightCatalogue - )->getResult() - ); - } - - protected function createOperation(MessageCatalogueInterface $source, MessageCatalogueInterface $target) - { - return new DiffOperation($source, $target); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php deleted file mode 100644 index 8b51c15..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Catalogue; - -use Symfony\Component\Translation\Catalogue\MergeOperation; -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\MessageCatalogueInterface; - -class MergeOperationTest extends AbstractOperationTest -{ - public function testGetMessagesFromSingleDomain() - { - $operation = $this->createOperation( - new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), - new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) - ); - - $this->assertEquals( - array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'), - $operation->getMessages('messages') - ); - - $this->assertEquals( - array('c' => 'new_c'), - $operation->getNewMessages('messages') - ); - - $this->assertEquals( - array(), - $operation->getObsoleteMessages('messages') - ); - } - - public function testGetResultFromSingleDomain() - { - $this->assertEquals( - new MessageCatalogue('en', array( - 'messages' => array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'), - )), - $this->createOperation( - new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), - new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) - )->getResult() - ); - } - - public function testGetResultWithMetadata() - { - $leftCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))); - $leftCatalogue->setMetadata('a', 'foo', 'messages'); - $leftCatalogue->setMetadata('b', 'bar', 'messages'); - $rightCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'new_b', 'c' => 'new_c'))); - $rightCatalogue->setMetadata('b', 'baz', 'messages'); - $rightCatalogue->setMetadata('c', 'qux', 'messages'); - - $mergedCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'))); - $mergedCatalogue->setMetadata('a', 'foo', 'messages'); - $mergedCatalogue->setMetadata('b', 'bar', 'messages'); - $mergedCatalogue->setMetadata('c', 'qux', 'messages'); - - $this->assertEquals( - $mergedCatalogue, - $this->createOperation( - $leftCatalogue, - $rightCatalogue - )->getResult() - ); - } - - protected function createOperation(MessageCatalogueInterface $source, MessageCatalogueInterface $target) - { - return new MergeOperation($source, $target); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php deleted file mode 100644 index 29177ff..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Dumper\CsvFileDumper; - -class CsvFileDumperTest extends \PHPUnit_Framework_TestCase -{ - public function testDump() - { - $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar', 'bar' => 'foo -foo', 'foo;foo' => 'bar')); - - $tempDir = sys_get_temp_dir(); - $dumper = new CsvFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); - - $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/valid.csv'), file_get_contents($tempDir.'/messages.en.csv')); - - unlink($tempDir.'/messages.en.csv'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php deleted file mode 100644 index 9682089..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Dumper\FileDumper; - -class FileDumperTest extends \PHPUnit_Framework_TestCase -{ - public function testDumpBackupsFileIfExisting() - { - $tempDir = sys_get_temp_dir(); - $file = $tempDir.'/messages.en.concrete'; - $backupFile = $file.'~'; - - @touch($file); - - $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); - - $dumper = new ConcreteFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); - - $this->assertTrue(file_exists($backupFile)); - - @unlink($file); - @unlink($backupFile); - } - - public function testDumpCreatesNestedDirectoriesAndFile() - { - $tempDir = sys_get_temp_dir(); - $translationsDir = $tempDir.'/test/translations'; - $file = $translationsDir.'/messages.en.concrete'; - - $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); - - $dumper = new ConcreteFileDumper(); - $dumper->setRelativePathTemplate('test/translations/%domain%.%locale%.%extension%'); - $dumper->dump($catalogue, array('path' => $tempDir)); - - $this->assertTrue(file_exists($file)); - - @unlink($file); - @rmdir($translationsDir); - } -} - -class ConcreteFileDumper extends FileDumper -{ - protected function format(MessageCatalogue $messages, $domain) - { - return ''; - } - - protected function getExtension() - { - return 'concrete'; - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php deleted file mode 100644 index 7be7dfb..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Dumper\IcuResFileDumper; - -class IcuResFileDumperTest extends \PHPUnit_Framework_TestCase -{ - public function testDump() - { - if (!function_exists('mb_convert_encoding')) { - $this->markTestSkipped('This test requires mbstring to work.'); - } - - $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); - - $tempDir = sys_get_temp_dir().'/IcuResFileDumperTest'; - $dumper = new IcuResFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); - - $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resourcebundle/res/en.res'), file_get_contents($tempDir.'/messages/en.res')); - - @unlink($tempDir.'/messages/en.res'); - @rmdir($tempDir.'/messages'); - @rmdir($tempDir); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php deleted file mode 100644 index 2a2cefd..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Dumper\IniFileDumper; - -class IniFileDumperTest extends \PHPUnit_Framework_TestCase -{ - public function testDump() - { - $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); - - $tempDir = sys_get_temp_dir(); - $dumper = new IniFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); - - $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.ini'), file_get_contents($tempDir.'/messages.en.ini')); - - unlink($tempDir.'/messages.en.ini'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php deleted file mode 100644 index 697cd93..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Dumper\JsonFileDumper; - -class JsonFileDumperTest extends \PHPUnit_Framework_TestCase -{ - public function testDump() - { - if (PHP_VERSION_ID < 50400) { - $this->markTestIncomplete('PHP below 5.4 doesn\'t support JSON pretty printing'); - } - - $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); - - $tempDir = sys_get_temp_dir(); - $dumper = new JsonFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); - - $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.json'), file_get_contents($tempDir.'/messages.en.json')); - - unlink($tempDir.'/messages.en.json'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php deleted file mode 100644 index 439a25c..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Dumper\MoFileDumper; - -class MoFileDumperTest extends \PHPUnit_Framework_TestCase -{ - public function testDump() - { - $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); - - $tempDir = sys_get_temp_dir(); - $dumper = new MoFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); - $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.mo'), file_get_contents($tempDir.'/messages.en.mo')); - - unlink($tempDir.'/messages.en.mo'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php deleted file mode 100644 index 18be5a0..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Dumper\PhpFileDumper; - -class PhpFileDumperTest extends \PHPUnit_Framework_TestCase -{ - public function testDump() - { - $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); - - $tempDir = sys_get_temp_dir(); - $dumper = new PhpFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); - - $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.php'), file_get_contents($tempDir.'/messages.en.php')); - - unlink($tempDir.'/messages.en.php'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php deleted file mode 100644 index 0296d6b..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Dumper\PoFileDumper; - -class PoFileDumperTest extends \PHPUnit_Framework_TestCase -{ - public function testDump() - { - $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); - - $tempDir = sys_get_temp_dir(); - $dumper = new PoFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); - $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.po'), file_get_contents($tempDir.'/messages.en.po')); - - unlink($tempDir.'/messages.en.po'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php deleted file mode 100644 index d7d8fb7..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Dumper\QtFileDumper; - -class QtFileDumperTest extends \PHPUnit_Framework_TestCase -{ - public function testDump() - { - $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar'), 'resources'); - - $tempDir = sys_get_temp_dir(); - $dumper = new QtFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); - - $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.ts'), file_get_contents($tempDir.'/resources.en.ts')); - - unlink($tempDir.'/resources.en.ts'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php deleted file mode 100644 index dff2cc4..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Dumper\XliffFileDumper; - -class XliffFileDumperTest extends \PHPUnit_Framework_TestCase -{ - public function testDump() - { - $catalogue = new MessageCatalogue('en_US'); - $catalogue->add(array( - 'foo' => 'bar', - 'key' => '', - 'key.with.cdata' => ' & ', - )); - $catalogue->setMetadata('foo', array('notes' => array(array('priority' => 1, 'from' => 'bar', 'content' => 'baz')))); - $catalogue->setMetadata('key', array('notes' => array(array('content' => 'baz'), array('content' => 'qux')))); - - $tempDir = sys_get_temp_dir(); - $dumper = new XliffFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir, 'default_locale' => 'fr_FR')); - - $this->assertEquals( - file_get_contents(__DIR__.'/../fixtures/resources-clean.xlf'), - file_get_contents($tempDir.'/messages.en_US.xlf') - ); - - unlink($tempDir.'/messages.en_US.xlf'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php deleted file mode 100644 index 3c68ade..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Dumper\YamlFileDumper; - -class YamlFileDumperTest extends \PHPUnit_Framework_TestCase -{ - public function testDump() - { - $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); - - $tempDir = sys_get_temp_dir(); - $dumper = new YamlFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); - - $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.yml'), file_get_contents($tempDir.'/messages.en.yml')); - - unlink($tempDir.'/messages.en.yml'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php deleted file mode 100644 index 352dd31..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests; - -use Symfony\Component\Intl\Util\IntlTestHelper; -use Symfony\Component\Translation\IdentityTranslator; - -class IdentityTranslatorTest extends \PHPUnit_Framework_TestCase -{ - /** - * @dataProvider getTransTests - */ - public function testTrans($expected, $id, $parameters) - { - $translator = new IdentityTranslator(); - - $this->assertEquals($expected, $translator->trans($id, $parameters)); - } - - /** - * @dataProvider getTransChoiceTests - */ - public function testTransChoiceWithExplicitLocale($expected, $id, $number, $parameters) - { - $translator = new IdentityTranslator(); - $translator->setLocale('en'); - - $this->assertEquals($expected, $translator->transChoice($id, $number, $parameters)); - } - - /** - * @dataProvider getTransChoiceTests - */ - public function testTransChoiceWithDefaultLocale($expected, $id, $number, $parameters) - { - \Locale::setDefault('en'); - - $translator = new IdentityTranslator(); - - $this->assertEquals($expected, $translator->transChoice($id, $number, $parameters)); - } - - public function testGetSetLocale() - { - $translator = new IdentityTranslator(); - $translator->setLocale('en'); - - $this->assertEquals('en', $translator->getLocale()); - } - - public function testGetLocaleReturnsDefaultLocaleIfNotSet() - { - // in order to test with "pt_BR" - IntlTestHelper::requireFullIntl($this); - - $translator = new IdentityTranslator(); - - \Locale::setDefault('en'); - $this->assertEquals('en', $translator->getLocale()); - - \Locale::setDefault('pt_BR'); - $this->assertEquals('pt_BR', $translator->getLocale()); - } - - public function getTransTests() - { - return array( - array('Symfony is great!', 'Symfony is great!', array()), - array('Symfony is awesome!', 'Symfony is %what%!', array('%what%' => 'awesome')), - ); - } - - public function getTransChoiceTests() - { - return array( - array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0, array('%count%' => 0)), - array('There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1, array('%count%' => 1)), - array('There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10, array('%count%' => 10)), - array('There are 0 apples', 'There is 1 apple|There are %count% apples', 0, array('%count%' => 0)), - array('There is 1 apple', 'There is 1 apple|There are %count% apples', 1, array('%count%' => 1)), - array('There are 10 apples', 'There is 1 apple|There are %count% apples', 10, array('%count%' => 10)), - // custom validation messages may be coded with a fixed value - array('There are 2 apples', 'There are 2 apples', 2, array('%count%' => 2)), - ); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/IntervalTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/IntervalTest.php deleted file mode 100644 index 075c98b..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/IntervalTest.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests; - -use Symfony\Component\Translation\Interval; - -class IntervalTest extends \PHPUnit_Framework_TestCase -{ - /** - * @dataProvider getTests - */ - public function testTest($expected, $number, $interval) - { - $this->assertEquals($expected, Interval::test($number, $interval)); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testTestException() - { - Interval::test(1, 'foobar'); - } - - public function getTests() - { - return array( - array(true, 3, '{1,2, 3 ,4}'), - array(false, 10, '{1,2, 3 ,4}'), - array(false, 3, '[1,2]'), - array(true, 1, '[1,2]'), - array(true, 2, '[1,2]'), - array(false, 1, ']1,2['), - array(false, 2, ']1,2['), - array(true, log(0), '[-Inf,2['), - array(true, -log(0), '[-2,+Inf]'), - ); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php deleted file mode 100644 index 463d3b5..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Loader; - -use Symfony\Component\Translation\Loader\CsvFileLoader; -use Symfony\Component\Config\Resource\FileResource; - -class CsvFileLoaderTest extends \PHPUnit_Framework_TestCase -{ - public function testLoad() - { - $loader = new CsvFileLoader(); - $resource = __DIR__.'/../fixtures/resources.csv'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - public function testLoadDoesNothingIfEmpty() - { - $loader = new CsvFileLoader(); - $resource = __DIR__.'/../fixtures/empty.csv'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array(), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException - */ - public function testLoadNonExistingResource() - { - $loader = new CsvFileLoader(); - $resource = __DIR__.'/../fixtures/not-exists.csv'; - $loader->load($resource, 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - */ - public function testLoadNonLocalResource() - { - $loader = new CsvFileLoader(); - $resource = 'http://example.com/resources.csv'; - $loader->load($resource, 'en', 'domain1'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php deleted file mode 100644 index ea9643d..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Loader; - -use Symfony\Component\Translation\Loader\IcuDatFileLoader; -use Symfony\Component\Config\Resource\FileResource; - -class IcuDatFileLoaderTest extends LocalizedTestCase -{ - protected function setUp() - { - if (!extension_loaded('intl')) { - $this->markTestSkipped('This test requires intl extension to work.'); - } - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - */ - public function testLoadInvalidResource() - { - $loader = new IcuDatFileLoader(); - $loader->load(__DIR__.'/../fixtures/resourcebundle/corrupted/resources', 'es', 'domain2'); - } - - public function testDatEnglishLoad() - { - // bundled resource is build using pkgdata command which at least in ICU 4.2 comes in extremely! buggy form - // you must specify an temporary build directory which is not the same as current directory and - // MUST reside on the same partition. pkgdata -p resources -T /srv -d.packagelist.txt - $loader = new IcuDatFileLoader(); - $resource = __DIR__.'/../fixtures/resourcebundle/dat/resources'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array('symfony' => 'Symfony 2 is great'), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource.'.dat')), $catalogue->getResources()); - } - - public function testDatFrenchLoad() - { - $loader = new IcuDatFileLoader(); - $resource = __DIR__.'/../fixtures/resourcebundle/dat/resources'; - $catalogue = $loader->load($resource, 'fr', 'domain1'); - - $this->assertEquals(array('symfony' => 'Symfony 2 est génial'), $catalogue->all('domain1')); - $this->assertEquals('fr', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource.'.dat')), $catalogue->getResources()); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException - */ - public function testLoadNonExistingResource() - { - $loader = new IcuDatFileLoader(); - $loader->load(__DIR__.'/../fixtures/non-existing.txt', 'en', 'domain1'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php deleted file mode 100644 index 1a935c0..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Loader; - -use Symfony\Component\Translation\Loader\IcuResFileLoader; -use Symfony\Component\Config\Resource\DirectoryResource; - -class IcuResFileLoaderTest extends LocalizedTestCase -{ - protected function setUp() - { - if (!extension_loaded('intl')) { - $this->markTestSkipped('This test requires intl extension to work.'); - } - } - - public function testLoad() - { - // resource is build using genrb command - $loader = new IcuResFileLoader(); - $resource = __DIR__.'/../fixtures/resourcebundle/res'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new DirectoryResource($resource)), $catalogue->getResources()); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException - */ - public function testLoadNonExistingResource() - { - $loader = new IcuResFileLoader(); - $loader->load(__DIR__.'/../fixtures/non-existing.txt', 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - */ - public function testLoadInvalidResource() - { - $loader = new IcuResFileLoader(); - $loader->load(__DIR__.'/../fixtures/resourcebundle/corrupted', 'en', 'domain1'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php deleted file mode 100644 index 1a5de0e..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Loader; - -use Symfony\Component\Translation\Loader\IniFileLoader; -use Symfony\Component\Config\Resource\FileResource; - -class IniFileLoaderTest extends \PHPUnit_Framework_TestCase -{ - public function testLoad() - { - $loader = new IniFileLoader(); - $resource = __DIR__.'/../fixtures/resources.ini'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - public function testLoadDoesNothingIfEmpty() - { - $loader = new IniFileLoader(); - $resource = __DIR__.'/../fixtures/empty.ini'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array(), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException - */ - public function testLoadNonExistingResource() - { - $loader = new IniFileLoader(); - $resource = __DIR__.'/../fixtures/non-existing.ini'; - $loader->load($resource, 'en', 'domain1'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php deleted file mode 100644 index 6d4f353..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Loader; - -use Symfony\Component\Translation\Loader\JsonFileLoader; -use Symfony\Component\Config\Resource\FileResource; - -class JsonFileLoaderTest extends \PHPUnit_Framework_TestCase -{ - protected function setUp() - { - if (!class_exists('Symfony\Component\Config\Loader\Loader')) { - $this->markTestSkipped('The "Config" component is not available'); - } - } - - public function testLoad() - { - $loader = new JsonFileLoader(); - $resource = __DIR__.'/../fixtures/resources.json'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - public function testLoadDoesNothingIfEmpty() - { - $loader = new JsonFileLoader(); - $resource = __DIR__.'/../fixtures/empty.json'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array(), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException - */ - public function testLoadNonExistingResource() - { - $loader = new JsonFileLoader(); - $resource = __DIR__.'/../fixtures/non-existing.json'; - $loader->load($resource, 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - * @expectedExceptionMessage Error parsing JSON - Syntax error, malformed JSON - */ - public function testParseException() - { - $loader = new JsonFileLoader(); - $resource = __DIR__.'/../fixtures/malformed.json'; - $loader->load($resource, 'en', 'domain1'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php deleted file mode 100644 index 9d7c5d7..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Loader; - -abstract class LocalizedTestCase extends \PHPUnit_Framework_TestCase -{ - protected function setUp() - { - if (!extension_loaded('intl')) { - $this->markTestSkipped('The "intl" extension is not available'); - } - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php deleted file mode 100644 index 34078d0..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Loader; - -use Symfony\Component\Translation\Loader\MoFileLoader; -use Symfony\Component\Config\Resource\FileResource; - -class MoFileLoaderTest extends \PHPUnit_Framework_TestCase -{ - public function testLoad() - { - $loader = new MoFileLoader(); - $resource = __DIR__.'/../fixtures/resources.mo'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - public function testLoadPlurals() - { - $loader = new MoFileLoader(); - $resource = __DIR__.'/../fixtures/plurals.mo'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array('foo' => 'bar', 'foos' => '{0} bar|{1} bars'), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException - */ - public function testLoadNonExistingResource() - { - $loader = new MoFileLoader(); - $resource = __DIR__.'/../fixtures/non-existing.mo'; - $loader->load($resource, 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - */ - public function testLoadInvalidResource() - { - $loader = new MoFileLoader(); - $resource = __DIR__.'/../fixtures/empty.mo'; - $loader->load($resource, 'en', 'domain1'); - } - - public function testLoadEmptyTranslation() - { - $loader = new MoFileLoader(); - $resource = __DIR__.'/../fixtures/empty-translation.mo'; - $catalogue = $loader->load($resource, 'en', 'message'); - - $this->assertEquals(array(), $catalogue->all('message')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php deleted file mode 100644 index 0816b0f..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Loader; - -use Symfony\Component\Translation\Loader\PhpFileLoader; -use Symfony\Component\Config\Resource\FileResource; - -class PhpFileLoaderTest extends \PHPUnit_Framework_TestCase -{ - public function testLoad() - { - $loader = new PhpFileLoader(); - $resource = __DIR__.'/../fixtures/resources.php'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException - */ - public function testLoadNonExistingResource() - { - $loader = new PhpFileLoader(); - $resource = __DIR__.'/../fixtures/non-existing.php'; - $loader->load($resource, 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - */ - public function testLoadThrowsAnExceptionIfFileNotLocal() - { - $loader = new PhpFileLoader(); - $resource = 'http://example.com/resources.php'; - $loader->load($resource, 'en', 'domain1'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php deleted file mode 100644 index 87090eb..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Loader; - -use Symfony\Component\Translation\Loader\PoFileLoader; -use Symfony\Component\Config\Resource\FileResource; - -class PoFileLoaderTest extends \PHPUnit_Framework_TestCase -{ - public function testLoad() - { - $loader = new PoFileLoader(); - $resource = __DIR__.'/../fixtures/resources.po'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - public function testLoadPlurals() - { - $loader = new PoFileLoader(); - $resource = __DIR__.'/../fixtures/plurals.po'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array('foo' => 'bar', 'foos' => 'bar|bars'), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - public function testLoadDoesNothingIfEmpty() - { - $loader = new PoFileLoader(); - $resource = __DIR__.'/../fixtures/empty.po'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array(), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException - */ - public function testLoadNonExistingResource() - { - $loader = new PoFileLoader(); - $resource = __DIR__.'/../fixtures/non-existing.po'; - $loader->load($resource, 'en', 'domain1'); - } - - public function testLoadEmptyTranslation() - { - $loader = new PoFileLoader(); - $resource = __DIR__.'/../fixtures/empty-translation.po'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array('foo' => ''), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - public function testEscapedId() - { - $loader = new PoFileLoader(); - $resource = __DIR__.'/../fixtures/escaped-id.po'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $messages = $catalogue->all('domain1'); - $this->assertArrayHasKey('escaped "foo"', $messages); - $this->assertEquals('escaped "bar"', $messages['escaped "foo"']); - } - - public function testEscapedIdPlurals() - { - $loader = new PoFileLoader(); - $resource = __DIR__.'/../fixtures/escaped-id-plurals.po'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $messages = $catalogue->all('domain1'); - $this->assertArrayHasKey('escaped "foo"', $messages); - $this->assertArrayHasKey('escaped "foos"', $messages); - $this->assertEquals('escaped "bar"', $messages['escaped "foo"']); - $this->assertEquals('escaped "bar"|escaped "bars"', $messages['escaped "foos"']); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php deleted file mode 100644 index 3aca86a..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Loader; - -use Symfony\Component\Translation\Loader\QtFileLoader; -use Symfony\Component\Config\Resource\FileResource; - -class QtFileLoaderTest extends \PHPUnit_Framework_TestCase -{ - public function testLoad() - { - $loader = new QtFileLoader(); - $resource = __DIR__.'/../fixtures/resources.ts'; - $catalogue = $loader->load($resource, 'en', 'resources'); - - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('resources')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException - */ - public function testLoadNonExistingResource() - { - $loader = new QtFileLoader(); - $resource = __DIR__.'/../fixtures/non-existing.ts'; - $loader->load($resource, 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - */ - public function testLoadNonLocalResource() - { - $loader = new QtFileLoader(); - $resource = 'http://domain1.com/resources.ts'; - $loader->load($resource, 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - */ - public function testLoadInvalidResource() - { - $loader = new QtFileLoader(); - $resource = __DIR__.'/../fixtures/invalid-xml-resources.xlf'; - $loader->load($resource, 'en', 'domain1'); - } - - public function testLoadEmptyResource() - { - $loader = new QtFileLoader(); - $resource = __DIR__.'/../fixtures/empty.xlf'; - $this->setExpectedException('Symfony\Component\Translation\Exception\InvalidResourceException', sprintf('Unable to load "%s".', $resource)); - $loader->load($resource, 'en', 'domain1'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php deleted file mode 100644 index c3d65b4..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Loader; - -use Symfony\Component\Translation\Loader\XliffFileLoader; -use Symfony\Component\Config\Resource\FileResource; - -class XliffFileLoaderTest extends \PHPUnit_Framework_TestCase -{ - public function testLoad() - { - $loader = new XliffFileLoader(); - $resource = __DIR__.'/../fixtures/resources.xlf'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - $this->assertSame(array(), libxml_get_errors()); - } - - public function testLoadWithInternalErrorsEnabled() - { - libxml_use_internal_errors(true); - - $this->assertSame(array(), libxml_get_errors()); - - $loader = new XliffFileLoader(); - $resource = __DIR__.'/../fixtures/resources.xlf'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - $this->assertSame(array(), libxml_get_errors()); - } - - public function testLoadWithResname() - { - $loader = new XliffFileLoader(); - $catalogue = $loader->load(__DIR__.'/../fixtures/resname.xlf', 'en', 'domain1'); - - $this->assertEquals(array('foo' => 'bar', 'bar' => 'baz', 'baz' => 'foo'), $catalogue->all('domain1')); - } - - public function testIncompleteResource() - { - $loader = new XliffFileLoader(); - $catalogue = $loader->load(__DIR__.'/../fixtures/resources.xlf', 'en', 'domain1'); - - $this->assertEquals(array('foo' => 'bar', 'key' => '', 'test' => 'with'), $catalogue->all('domain1')); - $this->assertFalse($catalogue->has('extra', 'domain1')); - } - - public function testEncoding() - { - if (!function_exists('iconv') && !function_exists('mb_convert_encoding')) { - $this->markTestSkipped('The iconv and mbstring extensions are not available.'); - } - - $loader = new XliffFileLoader(); - $catalogue = $loader->load(__DIR__.'/../fixtures/encoding.xlf', 'en', 'domain1'); - - $this->assertEquals(utf8_decode('föö'), $catalogue->get('bar', 'domain1')); - $this->assertEquals(utf8_decode('bär'), $catalogue->get('foo', 'domain1')); - $this->assertEquals(array('notes' => array(array('content' => utf8_decode('bäz')))), $catalogue->getMetadata('foo', 'domain1')); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - */ - public function testLoadInvalidResource() - { - $loader = new XliffFileLoader(); - $loader->load(__DIR__.'/../fixtures/resources.php', 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - */ - public function testLoadResourceDoesNotValidate() - { - $loader = new XliffFileLoader(); - $loader->load(__DIR__.'/../fixtures/non-valid.xlf', 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException - */ - public function testLoadNonExistingResource() - { - $loader = new XliffFileLoader(); - $resource = __DIR__.'/../fixtures/non-existing.xlf'; - $loader->load($resource, 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - */ - public function testLoadThrowsAnExceptionIfFileNotLocal() - { - $loader = new XliffFileLoader(); - $resource = 'http://example.com/resources.xlf'; - $loader->load($resource, 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - * @expectedExceptionMessage Document types are not allowed. - */ - public function testDocTypeIsNotAllowed() - { - $loader = new XliffFileLoader(); - $loader->load(__DIR__.'/../fixtures/withdoctype.xlf', 'en', 'domain1'); - } - - public function testParseEmptyFile() - { - $loader = new XliffFileLoader(); - $resource = __DIR__.'/../fixtures/empty.xlf'; - $this->setExpectedException('Symfony\Component\Translation\Exception\InvalidResourceException', sprintf('Unable to load "%s":', $resource)); - $loader->load($resource, 'en', 'domain1'); - } - - public function testLoadNotes() - { - $loader = new XliffFileLoader(); - $catalogue = $loader->load(__DIR__.'/../fixtures/withnote.xlf', 'en', 'domain1'); - - $this->assertEquals(array('notes' => array(array('priority' => 1, 'content' => 'foo'))), $catalogue->getMetadata('foo', 'domain1')); - // message without target - $this->assertNull($catalogue->getMetadata('extra', 'domain1')); - $this->assertEquals(array('notes' => array(array('content' => 'baz'), array('priority' => 2, 'from' => 'bar', 'content' => 'qux'))), $catalogue->getMetadata('key', 'domain1')); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php deleted file mode 100644 index 00f7163..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests\Loader; - -use Symfony\Component\Translation\Loader\YamlFileLoader; -use Symfony\Component\Config\Resource\FileResource; - -class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase -{ - public function testLoad() - { - $loader = new YamlFileLoader(); - $resource = __DIR__.'/../fixtures/resources.yml'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - public function testLoadDoesNothingIfEmpty() - { - $loader = new YamlFileLoader(); - $resource = __DIR__.'/../fixtures/empty.yml'; - $catalogue = $loader->load($resource, 'en', 'domain1'); - - $this->assertEquals(array(), $catalogue->all('domain1')); - $this->assertEquals('en', $catalogue->getLocale()); - $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException - */ - public function testLoadNonExistingResource() - { - $loader = new YamlFileLoader(); - $resource = __DIR__.'/../fixtures/non-existing.yml'; - $loader->load($resource, 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - */ - public function testLoadThrowsAnExceptionIfFileNotLocal() - { - $loader = new YamlFileLoader(); - $resource = 'http://example.com/resources.yml'; - $loader->load($resource, 'en', 'domain1'); - } - - /** - * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException - */ - public function testLoadThrowsAnExceptionIfNotAnArray() - { - $loader = new YamlFileLoader(); - $resource = __DIR__.'/../fixtures/non-valid.yml'; - $loader->load($resource, 'en', 'domain1'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php deleted file mode 100644 index ab98d72..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests; - -use Symfony\Component\Translation\Translator; -use Symfony\Component\Translation\LoggingTranslator; -use Symfony\Component\Translation\Loader\ArrayLoader; - -class LoggingTranslatorTest extends \PHPUnit_Framework_TestCase -{ - protected function setUp() - { - if (!interface_exists('Psr\Log\LoggerInterface')) { - $this->markTestSkipped('The "LoggerInterface" is not available'); - } - } - - public function testTransWithNoTranslationIsLogged() - { - $logger = $this->getMock('Psr\Log\LoggerInterface'); - $logger->expects($this->exactly(2)) - ->method('warning') - ->with('Translation not found.') - ; - - $translator = new Translator('ar'); - $loggableTranslator = new LoggingTranslator($translator, $logger); - $loggableTranslator->transChoice('some_message2', 10, array('%count%' => 10)); - $loggableTranslator->trans('bar'); - } - - public function testTransChoiceFallbackIsLogged() - { - $logger = $this->getMock('Psr\Log\LoggerInterface'); - $logger->expects($this->once()) - ->method('debug') - ->with('Translation use fallback catalogue.') - ; - - $translator = new Translator('ar'); - $translator->setFallbackLocales(array('en')); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en'); - $loggableTranslator = new LoggingTranslator($translator, $logger); - $loggableTranslator->transChoice('some_message2', 10, array('%count%' => 10)); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/MessageCatalogueTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/MessageCatalogueTest.php deleted file mode 100644 index 7d95655..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/MessageCatalogueTest.php +++ /dev/null @@ -1,200 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests; - -use Symfony\Component\Translation\MessageCatalogue; - -class MessageCatalogueTest extends \PHPUnit_Framework_TestCase -{ - public function testGetLocale() - { - $catalogue = new MessageCatalogue('en'); - - $this->assertEquals('en', $catalogue->getLocale()); - } - - public function testGetDomains() - { - $catalogue = new MessageCatalogue('en', array('domain1' => array(), 'domain2' => array())); - - $this->assertEquals(array('domain1', 'domain2'), $catalogue->getDomains()); - } - - public function testAll() - { - $catalogue = new MessageCatalogue('en', $messages = array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); - - $this->assertEquals(array('foo' => 'foo'), $catalogue->all('domain1')); - $this->assertEquals(array(), $catalogue->all('domain88')); - $this->assertEquals($messages, $catalogue->all()); - } - - public function testHas() - { - $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); - - $this->assertTrue($catalogue->has('foo', 'domain1')); - $this->assertFalse($catalogue->has('bar', 'domain1')); - $this->assertFalse($catalogue->has('foo', 'domain88')); - } - - public function testGetSet() - { - $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); - $catalogue->set('foo1', 'foo1', 'domain1'); - - $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); - $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); - } - - public function testAdd() - { - $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); - $catalogue->add(array('foo1' => 'foo1'), 'domain1'); - - $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); - $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); - - $catalogue->add(array('foo' => 'bar'), 'domain1'); - $this->assertEquals('bar', $catalogue->get('foo', 'domain1')); - $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); - - $catalogue->add(array('foo' => 'bar'), 'domain88'); - $this->assertEquals('bar', $catalogue->get('foo', 'domain88')); - } - - public function testReplace() - { - $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); - $catalogue->replace($messages = array('foo1' => 'foo1'), 'domain1'); - - $this->assertEquals($messages, $catalogue->all('domain1')); - } - - public function testAddCatalogue() - { - $r = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); - $r->expects($this->any())->method('__toString')->will($this->returnValue('r')); - - $r1 = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); - $r1->expects($this->any())->method('__toString')->will($this->returnValue('r1')); - - $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); - $catalogue->addResource($r); - - $catalogue1 = new MessageCatalogue('en', array('domain1' => array('foo1' => 'foo1'))); - $catalogue1->addResource($r1); - - $catalogue->addCatalogue($catalogue1); - - $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); - $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); - - $this->assertEquals(array($r, $r1), $catalogue->getResources()); - } - - public function testAddFallbackCatalogue() - { - $r = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); - $r->expects($this->any())->method('__toString')->will($this->returnValue('r')); - - $r1 = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); - $r1->expects($this->any())->method('__toString')->will($this->returnValue('r1')); - - $catalogue = new MessageCatalogue('en_US', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); - $catalogue->addResource($r); - - $catalogue1 = new MessageCatalogue('en', array('domain1' => array('foo' => 'bar', 'foo1' => 'foo1'))); - $catalogue1->addResource($r1); - - $catalogue->addFallbackCatalogue($catalogue1); - - $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); - $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); - - $this->assertEquals(array($r, $r1), $catalogue->getResources()); - } - - /** - * @expectedException \LogicException - */ - public function testAddFallbackCatalogueWithCircularReference() - { - $main = new MessageCatalogue('en_US'); - $fallback = new MessageCatalogue('fr_FR'); - - $fallback->addFallbackCatalogue($main); - $main->addFallbackCatalogue($fallback); - } - - /** - * @expectedException \LogicException - */ - public function testAddCatalogueWhenLocaleIsNotTheSameAsTheCurrentOne() - { - $catalogue = new MessageCatalogue('en'); - $catalogue->addCatalogue(new MessageCatalogue('fr', array())); - } - - public function testGetAddResource() - { - $catalogue = new MessageCatalogue('en'); - $r = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); - $r->expects($this->any())->method('__toString')->will($this->returnValue('r')); - $catalogue->addResource($r); - $catalogue->addResource($r); - $r1 = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); - $r1->expects($this->any())->method('__toString')->will($this->returnValue('r1')); - $catalogue->addResource($r1); - - $this->assertEquals(array($r, $r1), $catalogue->getResources()); - } - - public function testMetadataDelete() - { - $catalogue = new MessageCatalogue('en'); - $this->assertEquals(array(), $catalogue->getMetadata('', ''), 'Metadata is empty'); - $catalogue->deleteMetadata('key', 'messages'); - $catalogue->deleteMetadata('', 'messages'); - $catalogue->deleteMetadata(); - } - - public function testMetadataSetGetDelete() - { - $catalogue = new MessageCatalogue('en'); - $catalogue->setMetadata('key', 'value'); - $this->assertEquals('value', $catalogue->getMetadata('key', 'messages'), "Metadata 'key' = 'value'"); - - $catalogue->setMetadata('key2', array()); - $this->assertEquals(array(), $catalogue->getMetadata('key2', 'messages'), 'Metadata key2 is array'); - - $catalogue->deleteMetadata('key2', 'messages'); - $this->assertEquals(null, $catalogue->getMetadata('key2', 'messages'), 'Metadata key2 should is deleted.'); - - $catalogue->deleteMetadata('key2', 'domain'); - $this->assertEquals(null, $catalogue->getMetadata('key2', 'domain'), 'Metadata key2 should is deleted.'); - } - - public function testMetadataMerge() - { - $cat1 = new MessageCatalogue('en'); - $cat1->setMetadata('a', 'b'); - $this->assertEquals(array('messages' => array('a' => 'b')), $cat1->getMetadata('', ''), 'Cat1 contains messages metadata.'); - - $cat2 = new MessageCatalogue('en'); - $cat2->setMetadata('b', 'c', 'domain'); - $this->assertEquals(array('domain' => array('b' => 'c')), $cat2->getMetadata('', ''), 'Cat2 contains domain metadata.'); - - $cat1->addCatalogue($cat2); - $this->assertEquals(array('messages' => array('a' => 'b'), 'domain' => array('b' => 'c')), $cat1->getMetadata('', ''), 'Cat1 contains merged metadata.'); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/MessageSelectorTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/MessageSelectorTest.php deleted file mode 100644 index d5a4f3e..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/MessageSelectorTest.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests; - -use Symfony\Component\Translation\MessageSelector; - -class MessageSelectorTest extends \PHPUnit_Framework_TestCase -{ - /** - * @dataProvider getChooseTests - */ - public function testChoose($expected, $id, $number) - { - $selector = new MessageSelector(); - - $this->assertEquals($expected, $selector->choose($id, $number, 'en')); - } - - public function testReturnMessageIfExactlyOneStandardRuleIsGiven() - { - $selector = new MessageSelector(); - - $this->assertEquals('There are two apples', $selector->choose('There are two apples', 2, 'en')); - } - - /** - * @dataProvider getNonMatchingMessages - * @expectedException \InvalidArgumentException - */ - public function testThrowExceptionIfMatchingMessageCannotBeFound($id, $number) - { - $selector = new MessageSelector(); - - $selector->choose($id, $number, 'en'); - } - - public function getNonMatchingMessages() - { - return array( - array('{0} There are no apples|{1} There is one apple', 2), - array('{1} There is one apple|]1,Inf] There are %count% apples', 0), - array('{1} There is one apple|]2,Inf] There are %count% apples', 2), - array('{0} There are no apples|There is one apple', 2), - ); - } - - public function getChooseTests() - { - return array( - array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), - array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), - array('There are no apples', '{0}There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), - - array('There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1), - - array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10), - array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf]There are %count% apples', 10), - array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10), - - array('There are %count% apples', 'There is one apple|There are %count% apples', 0), - array('There is one apple', 'There is one apple|There are %count% apples', 1), - array('There are %count% apples', 'There is one apple|There are %count% apples', 10), - - array('There are %count% apples', 'one: There is one apple|more: There are %count% apples', 0), - array('There is one apple', 'one: There is one apple|more: There are %count% apples', 1), - array('There are %count% apples', 'one: There is one apple|more: There are %count% apples', 10), - - array('There are no apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 0), - array('There is one apple', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 1), - array('There are %count% apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 10), - - array('', '{0}|{1} There is one apple|]1,Inf] There are %count% apples', 0), - array('', '{0} There are no apples|{1}|]1,Inf] There are %count% apples', 1), - - // Indexed only tests which are Gettext PoFile* compatible strings. - array('There are %count% apples', 'There is one apple|There are %count% apples', 0), - array('There is one apple', 'There is one apple|There are %count% apples', 1), - array('There are %count% apples', 'There is one apple|There are %count% apples', 2), - - // Tests for float numbers - array('There is almost one apple', '{0} There are no apples|]0,1[ There is almost one apple|{1} There is one apple|[1,Inf] There is more than one apple', 0.7), - array('There is one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1), - array('There is more than one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1.7), - array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0), - array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0.0), - array('There are no apples', '{0.0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0), - ); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/PluralizationRulesTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/PluralizationRulesTest.php deleted file mode 100644 index 1e8ee70..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/PluralizationRulesTest.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests; - -use Symfony\Component\Translation\PluralizationRules; - -/** - * Test should cover all languages mentioned on http://translate.sourceforge.net/wiki/l10n/pluralforms - * and Plural forms mentioned on http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms. - * - * See also https://developer.mozilla.org/en/Localization_and_Plurals which mentions 15 rules having a maximum of 6 forms. - * The mozilla code is also interesting to check for. - * - * As mentioned by chx http://drupal.org/node/1273968 we can cover all by testing number from 0 to 199 - * - * The goal to cover all languages is to far fetched so this test case is smaller. - * - * @author Clemens Tolboom clemens@build2be.nl - */ -class PluralizationRulesTest extends \PHPUnit_Framework_TestCase -{ - /** - * We test failed langcode here. - * - * TODO: The languages mentioned in the data provide need to get fixed somehow within PluralizationRules. - * - * @dataProvider failingLangcodes - */ - public function testFailedLangcodes($nplural, $langCodes) - { - $matrix = $this->generateTestData($nplural, $langCodes); - $this->validateMatrix($nplural, $matrix, false); - } - - /** - * @dataProvider successLangcodes - */ - public function testLangcodes($nplural, $langCodes) - { - $matrix = $this->generateTestData($nplural, $langCodes); - $this->validateMatrix($nplural, $matrix); - } - - /** - * This array should contain all currently known langcodes. - * - * As it is impossible to have this ever complete we should try as hard as possible to have it almost complete. - * - * @return array - */ - public function successLangcodes() - { - return array( - array('1', array('ay','bo', 'cgg','dz','id', 'ja', 'jbo', 'ka','kk','km','ko','ky')), - array('2', array('nl', 'fr', 'en', 'de', 'de_GE')), - array('3', array('be','bs','cs','hr')), - array('4', array('cy','mt', 'sl')), - array('5', array()), - array('6', array('ar')), - ); - } - - /** - * This array should be at least empty within the near future. - * - * This both depends on a complete list trying to add above as understanding - * the plural rules of the current failing languages. - * - * @return array with nplural together with langcodes - */ - public function failingLangcodes() - { - return array( - array('1', array('fa')), - array('2', array('jbo')), - array('3', array('cbs')), - array('4', array('gd','kw')), - array('5', array('ga')), - array('6', array()), - ); - } - - /** - * We validate only on the plural coverage. Thus the real rules is not tested. - * - * @param string $nplural plural expected - * @param array $matrix containing langcodes and their plural index values. - * @param bool $expectSuccess - */ - protected function validateMatrix($nplural, $matrix, $expectSuccess = true) - { - foreach ($matrix as $langCode => $data) { - $indexes = array_flip($data); - if ($expectSuccess) { - $this->assertEquals($nplural, count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); - } else { - $this->assertNotEquals((int) $nplural, count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); - } - } - } - - protected function generateTestData($plural, $langCodes) - { - $matrix = array(); - foreach ($langCodes as $langCode) { - for ($count = 0; $count < 200; $count++) { - $plural = PluralizationRules::get($count, $langCode); - $matrix[$langCode][$count] = $plural; - } - } - - return $matrix; - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/TranslatorCacheTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/TranslatorCacheTest.php deleted file mode 100644 index 8b913f3..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/TranslatorCacheTest.php +++ /dev/null @@ -1,231 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests; - -use Symfony\Component\Translation\Translator; -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\MessageSelector; - -class TranslatorCacheTest extends \PHPUnit_Framework_TestCase -{ - protected $tmpDir; - - protected function setUp() - { - $this->tmpDir = sys_get_temp_dir().'/sf2_translation'; - $this->deleteTmpDir(); - } - - protected function tearDown() - { - $this->deleteTmpDir(); - } - - protected function deleteTmpDir() - { - if (!file_exists($dir = $this->tmpDir)) { - return; - } - - $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->tmpDir), \RecursiveIteratorIterator::CHILD_FIRST); - foreach ($iterator as $path) { - if (preg_match('#[/\\\\]\.\.?$#', $path->__toString())) { - continue; - } - if ($path->isDir()) { - rmdir($path->__toString()); - } else { - unlink($path->__toString()); - } - } - rmdir($this->tmpDir); - } - - public function testTransWithoutCaching() - { - $translator = $this->getTranslator($this->getLoader()); - $translator->setLocale('fr'); - $translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR', 'fr.UTF-8', 'sr@latin')); - - $this->assertEquals('foo (FR)', $translator->trans('foo')); - $this->assertEquals('bar (EN)', $translator->trans('bar')); - $this->assertEquals('foobar (ES)', $translator->trans('foobar')); - $this->assertEquals('choice 0 (EN)', $translator->transChoice('choice', 0)); - $this->assertEquals('no translation', $translator->trans('no translation')); - $this->assertEquals('foobarfoo (PT-PT)', $translator->trans('foobarfoo')); - $this->assertEquals('other choice 1 (PT-BR)', $translator->transChoice('other choice', 1)); - $this->assertEquals('foobarbaz (fr.UTF-8)', $translator->trans('foobarbaz')); - $this->assertEquals('foobarbax (sr@latin)', $translator->trans('foobarbax')); - } - - public function testTransWithCaching() - { - // prime the cache - $translator = $this->getTranslator($this->getLoader(), $this->tmpDir); - $translator->setLocale('fr'); - $translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR', 'fr.UTF-8', 'sr@latin')); - - $this->assertEquals('foo (FR)', $translator->trans('foo')); - $this->assertEquals('bar (EN)', $translator->trans('bar')); - $this->assertEquals('foobar (ES)', $translator->trans('foobar')); - $this->assertEquals('choice 0 (EN)', $translator->transChoice('choice', 0)); - $this->assertEquals('no translation', $translator->trans('no translation')); - $this->assertEquals('foobarfoo (PT-PT)', $translator->trans('foobarfoo')); - $this->assertEquals('other choice 1 (PT-BR)', $translator->transChoice('other choice', 1)); - $this->assertEquals('foobarbaz (fr.UTF-8)', $translator->trans('foobarbaz')); - $this->assertEquals('foobarbax (sr@latin)', $translator->trans('foobarbax')); - - // do it another time as the cache is primed now - $loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); - $translator = $this->getTranslator($loader, $this->tmpDir); - $translator->setLocale('fr'); - $translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR', 'fr.UTF-8', 'sr@latin')); - - $this->assertEquals('foo (FR)', $translator->trans('foo')); - $this->assertEquals('bar (EN)', $translator->trans('bar')); - $this->assertEquals('foobar (ES)', $translator->trans('foobar')); - $this->assertEquals('choice 0 (EN)', $translator->transChoice('choice', 0)); - $this->assertEquals('no translation', $translator->trans('no translation')); - $this->assertEquals('foobarfoo (PT-PT)', $translator->trans('foobarfoo')); - $this->assertEquals('other choice 1 (PT-BR)', $translator->transChoice('other choice', 1)); - $this->assertEquals('foobarbaz (fr.UTF-8)', $translator->trans('foobarbaz')); - $this->assertEquals('foobarbax (sr@latin)', $translator->trans('foobarbax')); - } - - public function testTransWithCachingWithInvalidLocale() - { - $loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); - $translator = $this->getTranslator($loader, $this->tmpDir, 'Symfony\Component\Translation\Tests\TranslatorWithInvalidLocale'); - - $translator->setLocale('invalid locale'); - - try { - $translator->trans('foo'); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertFalse(file_exists($this->tmpDir.'/catalogue.invalid locale.php')); - } - } - - public function testLoadCatalogueWithCachingWithInvalidLocale() - { - $loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); - $translator = $this->getTranslator($loader, $this->tmpDir, 'Symfony\Component\Translation\Tests\TranslatorWithInvalidLocale'); - - try { - $translator->proxyLoadCatalogue('invalid locale'); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertFalse(file_exists($this->tmpDir.'/catalogue.invalid locale.php')); - } - } - - protected function getCatalogue($locale, $messages) - { - $catalogue = new MessageCatalogue($locale); - foreach ($messages as $key => $translation) { - $catalogue->set($key, $translation); - } - - return $catalogue; - } - - protected function getLoader() - { - $loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); - $loader - ->expects($this->at(0)) - ->method('load') - ->will($this->returnValue($this->getCatalogue('fr', array( - 'foo' => 'foo (FR)', - )))) - ; - $loader - ->expects($this->at(1)) - ->method('load') - ->will($this->returnValue($this->getCatalogue('en', array( - 'foo' => 'foo (EN)', - 'bar' => 'bar (EN)', - 'choice' => '{0} choice 0 (EN)|{1} choice 1 (EN)|]1,Inf] choice inf (EN)', - )))) - ; - $loader - ->expects($this->at(2)) - ->method('load') - ->will($this->returnValue($this->getCatalogue('es', array( - 'foobar' => 'foobar (ES)', - )))) - ; - $loader - ->expects($this->at(3)) - ->method('load') - ->will($this->returnValue($this->getCatalogue('pt-PT', array( - 'foobarfoo' => 'foobarfoo (PT-PT)', - )))) - ; - $loader - ->expects($this->at(4)) - ->method('load') - ->will($this->returnValue($this->getCatalogue('pt_BR', array( - 'other choice' => '{0} other choice 0 (PT-BR)|{1} other choice 1 (PT-BR)|]1,Inf] other choice inf (PT-BR)', - )))) - ; - $loader - ->expects($this->at(5)) - ->method('load') - ->will($this->returnValue($this->getCatalogue('fr.UTF-8', array( - 'foobarbaz' => 'foobarbaz (fr.UTF-8)', - )))) - ; - $loader - ->expects($this->at(6)) - ->method('load') - ->will($this->returnValue($this->getCatalogue('sr@latin', array( - 'foobarbax' => 'foobarbax (sr@latin)', - )))) - ; - - return $loader; - } - - public function getTranslator($loader, $cacheDir = null, $translatorClass = '\Symfony\Component\Translation\Translator') - { - $translator = new $translatorClass('fr', new MessageSelector(), $cacheDir); - - $translator->addLoader('loader', $loader); - $translator->addResource('loader', 'foo', 'fr'); - $translator->addResource('loader', 'foo', 'en'); - $translator->addResource('loader', 'foo', 'es'); - $translator->addResource('loader', 'foo', 'pt-PT'); // European Portuguese - $translator->addResource('loader', 'foo', 'pt_BR'); // Brazilian Portuguese - $translator->addResource('loader', 'foo', 'fr.UTF-8'); - $translator->addResource('loader', 'foo', 'sr@latin'); // Latin Serbian - - return $translator; - } -} - -class TranslatorWithInvalidLocale extends Translator -{ - /** - * {@inheritdoc} - */ - public function setLocale($locale) - { - $this->locale = $locale; - } - - public function proxyLoadCatalogue($locale) - { - $this->loadCatalogue($locale); - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/TranslatorTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/TranslatorTest.php deleted file mode 100644 index e60d8fa..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/TranslatorTest.php +++ /dev/null @@ -1,604 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Tests; - -use Symfony\Component\Translation\Translator; -use Symfony\Component\Translation\MessageSelector; -use Symfony\Component\Translation\Loader\ArrayLoader; -use Symfony\Component\Translation\MessageCatalogue; - -class TranslatorTest extends \PHPUnit_Framework_TestCase -{ - /** - * @dataProvider getInvalidLocalesTests - * @expectedException \InvalidArgumentException - */ - public function testConstructorInvalidLocale($locale) - { - $translator = new Translator($locale, new MessageSelector()); - } - - /** - * @dataProvider getValidLocalesTests - */ - public function testConstructorValidLocale($locale) - { - $translator = new Translator($locale, new MessageSelector()); - - $this->assertEquals($locale, $translator->getLocale()); - } - - public function testConstructorWithoutLocale() - { - $translator = new Translator(null, new MessageSelector()); - - $this->assertNull($translator->getLocale()); - } - - public function testSetGetLocale() - { - $translator = new Translator('en'); - - $this->assertEquals('en', $translator->getLocale()); - - $translator->setLocale('fr'); - $this->assertEquals('fr', $translator->getLocale()); - } - - /** - * @dataProvider getInvalidLocalesTests - * @expectedException \InvalidArgumentException - */ - public function testSetInvalidLocale($locale) - { - $translator = new Translator('fr', new MessageSelector()); - $translator->setLocale($locale); - } - - /** - * @dataProvider getValidLocalesTests - */ - public function testSetValidLocale($locale) - { - $translator = new Translator($locale, new MessageSelector()); - $translator->setLocale($locale); - - $this->assertEquals($locale, $translator->getLocale()); - } - - public function testGetCatalogue() - { - $translator = new Translator('en'); - - $this->assertEquals(new MessageCatalogue('en'), $translator->getCatalogue()); - - $translator->setLocale('fr'); - $this->assertEquals(new MessageCatalogue('fr'), $translator->getCatalogue('fr')); - } - - public function testSetFallbackLocales() - { - $translator = new Translator('en'); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); - $translator->addResource('array', array('bar' => 'foobar'), 'fr'); - - // force catalogue loading - $translator->trans('bar'); - - $translator->setFallbackLocales(array('fr')); - $this->assertEquals('foobar', $translator->trans('bar')); - } - - public function testSetFallbackLocalesMultiple() - { - $translator = new Translator('en'); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foo (en)'), 'en'); - $translator->addResource('array', array('bar' => 'bar (fr)'), 'fr'); - - // force catalogue loading - $translator->trans('bar'); - - $translator->setFallbackLocales(array('fr_FR', 'fr')); - $this->assertEquals('bar (fr)', $translator->trans('bar')); - } - - /** - * @dataProvider getInvalidLocalesTests - * @expectedException \InvalidArgumentException - */ - public function testSetFallbackInvalidLocales($locale) - { - $translator = new Translator('fr', new MessageSelector()); - $translator->setFallbackLocales(array('fr', $locale)); - } - - /** - * @dataProvider getValidLocalesTests - */ - public function testSetFallbackValidLocales($locale) - { - $translator = new Translator($locale, new MessageSelector()); - $translator->setFallbackLocales(array('fr', $locale)); - // no assertion. this method just asserts that no exception is thrown - } - - public function testTransWithFallbackLocale() - { - $translator = new Translator('fr_FR'); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foofoo'), 'en_US'); - $translator->addResource('array', array('bar' => 'foobar'), 'en'); - - $translator->setFallbackLocales(array('en')); - - $this->assertEquals('foobar', $translator->trans('bar')); - } - - /** - * @dataProvider getInvalidLocalesTests - * @expectedException \InvalidArgumentException - */ - public function testAddResourceInvalidLocales($locale) - { - $translator = new Translator('fr', new MessageSelector()); - $translator->addResource('array', array('foo' => 'foofoo'), $locale); - } - - /** - * @dataProvider getValidLocalesTests - */ - public function testAddResourceValidLocales($locale) - { - $translator = new Translator('fr', new MessageSelector()); - $translator->addResource('array', array('foo' => 'foofoo'), $locale); - // no assertion. this method just asserts that no exception is thrown - } - - public function testAddResourceAfterTrans() - { - $translator = new Translator('fr'); - $translator->addLoader('array', new ArrayLoader()); - - $translator->setFallbackLocales(array('en')); - - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); - $this->assertEquals('foofoo', $translator->trans('foo')); - - $translator->addResource('array', array('bar' => 'foobar'), 'en'); - $this->assertEquals('foobar', $translator->trans('bar')); - } - - /** - * @dataProvider getTransFileTests - * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException - */ - public function testTransWithoutFallbackLocaleFile($format, $loader) - { - $loaderClass = 'Symfony\\Component\\Translation\\Loader\\'.$loader; - $translator = new Translator('en'); - $translator->addLoader($format, new $loaderClass()); - $translator->addResource($format, __DIR__.'/fixtures/non-existing', 'en'); - $translator->addResource($format, __DIR__.'/fixtures/resources.'.$format, 'en'); - - // force catalogue loading - $translator->trans('foo'); - } - - /** - * @dataProvider getTransFileTests - */ - public function testTransWithFallbackLocaleFile($format, $loader) - { - $loaderClass = 'Symfony\\Component\\Translation\\Loader\\'.$loader; - $translator = new Translator('en_GB'); - $translator->addLoader($format, new $loaderClass()); - $translator->addResource($format, __DIR__.'/fixtures/non-existing', 'en_GB'); - $translator->addResource($format, __DIR__.'/fixtures/resources.'.$format, 'en', 'resources'); - - $this->assertEquals('bar', $translator->trans('foo', array(), 'resources')); - } - - public function testTransWithFallbackLocaleBis() - { - $translator = new Translator('en_US'); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foofoo'), 'en_US'); - $translator->addResource('array', array('bar' => 'foobar'), 'en'); - $this->assertEquals('foobar', $translator->trans('bar')); - } - - public function testTransWithFallbackLocaleTer() - { - $translator = new Translator('fr_FR'); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foo (en_US)'), 'en_US'); - $translator->addResource('array', array('bar' => 'bar (en)'), 'en'); - - $translator->setFallbackLocales(array('en_US', 'en')); - - $this->assertEquals('foo (en_US)', $translator->trans('foo')); - $this->assertEquals('bar (en)', $translator->trans('bar')); - } - - public function testTransNonExistentWithFallback() - { - $translator = new Translator('fr'); - $translator->setFallbackLocales(array('en')); - $translator->addLoader('array', new ArrayLoader()); - $this->assertEquals('non-existent', $translator->trans('non-existent')); - } - - /** - * @expectedException \RuntimeException - */ - public function testWhenAResourceHasNoRegisteredLoader() - { - $translator = new Translator('en'); - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); - - $translator->trans('foo'); - } - - /** - * @dataProvider getTransTests - */ - public function testTrans($expected, $id, $translation, $parameters, $locale, $domain) - { - $translator = new Translator('en'); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array((string) $id => $translation), $locale, $domain); - - $this->assertEquals($expected, $translator->trans($id, $parameters, $domain, $locale)); - } - - /** - * @dataProvider getInvalidLocalesTests - * @expectedException \InvalidArgumentException - */ - public function testTransInvalidLocale($locale) - { - $translator = new Translator('en', new MessageSelector()); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); - - $translator->trans('foo', array(), '', $locale); - } - - /** - * @dataProvider getValidLocalesTests - */ - public function testTransValidLocale($locale) - { - $translator = new Translator('en', new MessageSelector()); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); - - $translator->trans('foo', array(), '', $locale); - // no assertion. this method just asserts that no exception is thrown - } - - /** - * @dataProvider getFlattenedTransTests - */ - public function testFlattenedTrans($expected, $messages, $id) - { - $translator = new Translator('en'); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', $messages, 'fr', ''); - - $this->assertEquals($expected, $translator->trans($id, array(), '', 'fr')); - } - - /** - * @dataProvider getTransChoiceTests - */ - public function testTransChoice($expected, $id, $translation, $number, $parameters, $locale, $domain) - { - $translator = new Translator('en'); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array((string) $id => $translation), $locale, $domain); - - $this->assertEquals($expected, $translator->transChoice($id, $number, $parameters, $domain, $locale)); - } - - /** - * @dataProvider getInvalidLocalesTests - * @expectedException \InvalidArgumentException - */ - public function testTransChoiceInvalidLocale($locale) - { - $translator = new Translator('en', new MessageSelector()); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); - - $translator->transChoice('foo', 1, array(), '', $locale); - } - - /** - * @dataProvider getValidLocalesTests - */ - public function testTransChoiceValidLocale($locale) - { - $translator = new Translator('en', new MessageSelector()); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('foo' => 'foofoo'), 'en'); - - $translator->transChoice('foo', 1, array(), '', $locale); - // no assertion. this method just asserts that no exception is thrown - } - - public function getTransFileTests() - { - return array( - array('csv', 'CsvFileLoader'), - array('ini', 'IniFileLoader'), - array('mo', 'MoFileLoader'), - array('po', 'PoFileLoader'), - array('php', 'PhpFileLoader'), - array('ts', 'QtFileLoader'), - array('xlf', 'XliffFileLoader'), - array('yml', 'YamlFileLoader'), - array('json', 'JsonFileLoader'), - ); - } - - public function getTransTests() - { - return array( - array('Symfony est super !', 'Symfony is great!', 'Symfony est super !', array(), 'fr', ''), - array('Symfony est awesome !', 'Symfony is %what%!', 'Symfony est %what% !', array('%what%' => 'awesome'), 'fr', ''), - array('Symfony est super !', new StringClass('Symfony is great!'), 'Symfony est super !', array(), 'fr', ''), - ); - } - - public function getFlattenedTransTests() - { - $messages = array( - 'symfony' => array( - 'is' => array( - 'great' => 'Symfony est super!', - ), - ), - 'foo' => array( - 'bar' => array( - 'baz' => 'Foo Bar Baz', - ), - 'baz' => 'Foo Baz', - ), - ); - - return array( - array('Symfony est super!', $messages, 'symfony.is.great'), - array('Foo Bar Baz', $messages, 'foo.bar.baz'), - array('Foo Baz', $messages, 'foo.baz'), - ); - } - - public function getTransChoiceTests() - { - return array( - array('Il y a 0 pomme', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array('%count%' => 0), 'fr', ''), - array('Il y a 1 pomme', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 1, array('%count%' => 1), 'fr', ''), - array('Il y a 10 pommes', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 10, array('%count%' => 10), 'fr', ''), - - array('Il y a 0 pomme', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 0, array('%count%' => 0), 'fr', ''), - array('Il y a 1 pomme', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 1, array('%count%' => 1), 'fr', ''), - array('Il y a 10 pommes', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 10, array('%count%' => 10), 'fr', ''), - - array('Il y a 0 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array('%count%' => 0), 'fr', ''), - array('Il y a 1 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array('%count%' => 1), 'fr', ''), - array('Il y a 10 pommes', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array('%count%' => 10), 'fr', ''), - - array('Il n\'y a aucune pomme', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array('%count%' => 0), 'fr', ''), - array('Il y a 1 pomme', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array('%count%' => 1), 'fr', ''), - array('Il y a 10 pommes', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array('%count%' => 10), 'fr', ''), - - array('Il y a 0 pomme', new StringClass('{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples'), '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array('%count%' => 0), 'fr', ''), - ); - } - - public function getInvalidLocalesTests() - { - return array( - array('fr FR'), - array('français'), - array('fr+en'), - array('utf#8'), - array('fr&en'), - array('fr~FR'), - array(' fr'), - array('fr '), - array('fr*'), - array('fr/FR'), - array('fr\\FR'), - ); - } - - public function getValidLocalesTests() - { - return array( - array(''), - array(null), - array('fr'), - array('francais'), - array('FR'), - array('frFR'), - array('fr-FR'), - array('fr_FR'), - array('fr.FR'), - array('fr-FR.UTF8'), - array('sr@latin'), - ); - } - - public function testTransChoiceFallback() - { - $translator = new Translator('ru'); - $translator->setFallbackLocales(array('en')); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en'); - - $this->assertEquals('10 things', $translator->transChoice('some_message2', 10, array('%count%' => 10))); - } - - public function testTransChoiceFallbackBis() - { - $translator = new Translator('ru'); - $translator->setFallbackLocales(array('en_US', 'en')); - $translator->addLoader('array', new ArrayLoader()); - $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en_US'); - - $this->assertEquals('10 things', $translator->transChoice('some_message2', 10, array('%count%' => 10))); - } - - public function testTransChoiceFallbackWithNoTranslation() - { - $translator = new Translator('ru'); - $translator->setFallbackLocales(array('en')); - $translator->addLoader('array', new ArrayLoader()); - - // consistent behavior with Translator::trans(), which returns the string - // unchanged if it can't be found - $this->assertEquals('some_message2', $translator->transChoice('some_message2', 10, array('%count%' => 10))); - } - - /** - * @dataProvider dataProviderGetMessages - */ - public function testGetMessages($resources, $locale, $expected) - { - $locales = array_keys($resources); - $_locale = !is_null($locale) ? $locale : reset($locales); - $locales = array_slice($locales, 0, array_search($_locale, $locales)); - - $translator = new Translator($_locale, new MessageSelector()); - $translator->setFallbackLocales(array_reverse($locales)); - $translator->addLoader('array', new ArrayLoader()); - foreach ($resources as $_locale => $domainMessages) { - foreach ($domainMessages as $domain => $messages) { - $translator->addResource('array', $messages, $_locale, $domain); - } - } - $result = $translator->getMessages($locale); - - $this->assertEquals($expected, $result); - } - - public function dataProviderGetMessages() - { - $resources = array( - 'en' => array( - 'jsmessages' => array( - 'foo' => 'foo (EN)', - 'bar' => 'bar (EN)', - ), - 'messages' => array( - 'foo' => 'foo messages (EN)', - ), - 'validators' => array( - 'int' => 'integer (EN)', - ), - ), - 'pt-PT' => array( - 'messages' => array( - 'foo' => 'foo messages (PT)', - ), - 'validators' => array( - 'str' => 'integer (PT)', - ), - ), - 'pt_BR' => array( - 'validators' => array( - 'int' => 'integer (BR)', - ), - ), - ); - - return array( - array($resources, null, - array( - 'jsmessages' => array( - 'foo' => 'foo (EN)', - 'bar' => 'bar (EN)', - ), - 'messages' => array( - 'foo' => 'foo messages (EN)', - ), - 'validators' => array( - 'int' => 'integer (EN)', - ), - ), - ), - array($resources, 'en', - array( - 'jsmessages' => array( - 'foo' => 'foo (EN)', - 'bar' => 'bar (EN)', - ), - 'messages' => array( - 'foo' => 'foo messages (EN)', - ), - 'validators' => array( - 'int' => 'integer (EN)', - ), - ), - ), - array($resources, 'pt-PT', - array( - 'jsmessages' => array( - 'foo' => 'foo (EN)', - 'bar' => 'bar (EN)', - ), - 'messages' => array( - 'foo' => 'foo messages (PT)', - ), - 'validators' => array( - 'int' => 'integer (EN)', - 'str' => 'integer (PT)', - ), - ), - ), - array($resources, 'pt_BR', - array( - 'jsmessages' => array( - 'foo' => 'foo (EN)', - 'bar' => 'bar (EN)', - ), - 'messages' => array( - 'foo' => 'foo messages (PT)', - ), - 'validators' => array( - 'int' => 'integer (BR)', - 'str' => 'integer (PT)', - ), - ), - ), - ); - } -} - -class StringClass -{ - protected $str; - - public function __construct($str) - { - $this->str = $str; - } - - public function __toString() - { - return $this->str; - } -} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty-translation.mo b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty-translation.mo deleted file mode 100644 index ed01000..0000000 Binary files a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty-translation.mo and /dev/null differ diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty-translation.po b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty-translation.po deleted file mode 100644 index ff6f22a..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty-translation.po +++ /dev/null @@ -1,3 +0,0 @@ -msgid "foo" -msgstr "" - diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.csv b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.csv deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.ini b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.ini deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.json b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.json deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.mo b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.mo deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.po b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.po deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.xlf deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.yml b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.yml deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/encoding.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/encoding.xlf deleted file mode 100644 index 0a88f92..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/encoding.xlf +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - foo - bär - bäz - - - bar - föö - - - - diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/escaped-id-plurals.po b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/escaped-id-plurals.po deleted file mode 100644 index c412aa2..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/escaped-id-plurals.po +++ /dev/null @@ -1,10 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" - -msgid "escaped \"foo\"" -msgid_plural "escaped \"foos\"" -msgstr[0] "escaped \"bar\"" -msgstr[1] "escaped \"bars\"" diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/escaped-id.po b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/escaped-id.po deleted file mode 100644 index 308eadd..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/escaped-id.po +++ /dev/null @@ -1,8 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" - -msgid "escaped \"foo\"" -msgstr "escaped \"bar\"" diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/invalid-xml-resources.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/invalid-xml-resources.xlf deleted file mode 100644 index 7bf6c98..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/invalid-xml-resources.xlf +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - foo - bar - - - extra - - - key - - - - test - with - note - - - - diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/malformed.json b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/malformed.json deleted file mode 100644 index 1ee47ff..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/malformed.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "foo": "bar" " -} \ No newline at end of file diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/non-valid.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/non-valid.xlf deleted file mode 100644 index 734fc97..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/non-valid.xlf +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - foo - bar - - - - diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/non-valid.yml b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/non-valid.yml deleted file mode 100644 index 257cc56..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/non-valid.yml +++ /dev/null @@ -1 +0,0 @@ -foo diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/plurals.mo b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/plurals.mo deleted file mode 100644 index 6445e77..0000000 Binary files a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/plurals.mo and /dev/null differ diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/plurals.po b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/plurals.po deleted file mode 100644 index 439c41a..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/plurals.po +++ /dev/null @@ -1,5 +0,0 @@ -msgid "foo" -msgid_plural "foos" -msgstr[0] "bar" -msgstr[1] "bars" - diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resname.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resname.xlf deleted file mode 100644 index 2df16af..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resname.xlf +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - bar - - - bar source - baz - - - baz - foo - - - - diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/corrupted/resources.dat b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/corrupted/resources.dat deleted file mode 100644 index 391250c..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/corrupted/resources.dat +++ /dev/null @@ -1 +0,0 @@ -XXX \ No newline at end of file diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.res b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.res deleted file mode 100644 index 1fc1436..0000000 Binary files a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.res and /dev/null differ diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt deleted file mode 100644 index 3d9e9ea..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt +++ /dev/null @@ -1,3 +0,0 @@ -en{ - symfony{"Symfony is great"} -} \ No newline at end of file diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.res b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.res deleted file mode 100644 index f584160..0000000 Binary files a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.res and /dev/null differ diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt deleted file mode 100644 index 182d0a0..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt +++ /dev/null @@ -1,3 +0,0 @@ -fr{ - symfony{"Symfony est génial"} -} \ No newline at end of file diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/packagelist.txt b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/packagelist.txt deleted file mode 100644 index c5783ed..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/packagelist.txt +++ /dev/null @@ -1,2 +0,0 @@ -en.res -fr.res diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/resources.dat b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/resources.dat deleted file mode 100644 index 563b0ea..0000000 Binary files a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/resources.dat and /dev/null differ diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/res/en.res b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/res/en.res deleted file mode 100644 index ad894a9..0000000 Binary files a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/res/en.res and /dev/null differ diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources-clean.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources-clean.xlf deleted file mode 100644 index 4ce15af..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources-clean.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - foo - bar - baz - - - key - - baz - qux - - - key.with.cdata - & ]]> - - - - diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.csv b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.csv deleted file mode 100644 index 374b9eb..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.csv +++ /dev/null @@ -1,4 +0,0 @@ -"foo"; "bar" -#"bar"; "foo" -"incorrect"; "number"; "columns"; "will"; "be"; "ignored" -"incorrect" \ No newline at end of file diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.ini b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.ini deleted file mode 100644 index 4953062..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.ini +++ /dev/null @@ -1 +0,0 @@ -foo="bar" diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.json b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.json deleted file mode 100644 index 8a79687..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "foo": "bar" -} \ No newline at end of file diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.mo b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.mo deleted file mode 100644 index 0a96602..0000000 Binary files a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.mo and /dev/null differ diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.php deleted file mode 100644 index c291398..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.php +++ /dev/null @@ -1,5 +0,0 @@ - 'bar', -); diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.po b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.po deleted file mode 100644 index ccfce6b..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.po +++ /dev/null @@ -1,8 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en\n" - -msgid "foo" -msgstr "bar" \ No newline at end of file diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.ts b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.ts deleted file mode 100644 index 40e1852..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.ts +++ /dev/null @@ -1,10 +0,0 @@ - - - - resources - - foo - bar - - - diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.xlf deleted file mode 100644 index b0e5988..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.xlf +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - foo - bar - - - extra - - - key - - - - test - with - note - - - - diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.yml b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.yml deleted file mode 100644 index 20e9ff3..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.yml +++ /dev/null @@ -1 +0,0 @@ -foo: bar diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/valid.csv b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/valid.csv deleted file mode 100644 index 59882e5..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/valid.csv +++ /dev/null @@ -1,4 +0,0 @@ -foo;bar -bar;"foo -foo" -"foo;foo";bar diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/withdoctype.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/withdoctype.xlf deleted file mode 100644 index f83e834..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/withdoctype.xlf +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - foo - bar - - - - diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/withnote.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/withnote.xlf deleted file mode 100644 index b1d3f83..0000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/withnote.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - foo - bar - foo - - - extra - bar - - - key - - baz - qux - - - - -- cgit v1.2.3-70-g09d2