summaryrefslogtreecommitdiffstats
path: root/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2015-05-11 15:02:33 +0200
committerStefan Suhren <suhren.stefan@fh-swf.de>2015-05-11 15:02:33 +0200
commita7e17cb70e9306f8887bd2b5ca1a37edcbe3ea0f (patch)
treebf6e04c9bdba66e249fd6b78391e132da130848c /Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader
parentea3fed0df4eaedd820f3f405502b62efe5952f8f (diff)
downloadInternetTechnologien-a7e17cb70e9306f8887bd2b5ca1a37edcbe3ea0f.tar.gz
InternetTechnologien-a7e17cb70e9306f8887bd2b5ca1a37edcbe3ea0f.zip
Let composer manage its own files
Diffstat (limited to 'Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader')
-rw-r--r--Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php60
-rw-r--r--Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php68
-rw-r--r--Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php55
-rw-r--r--Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php50
-rw-r--r--Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php68
-rw-r--r--Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php22
-rw-r--r--Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php71
-rw-r--r--Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php49
-rw-r--r--Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php96
-rw-r--r--Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php67
-rw-r--r--Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php142
-rw-r--r--Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php70
12 files changed, 0 insertions, 818 deletions
diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php
deleted file mode 100644
index 463d3b5..0000000
--- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php
deleted file mode 100644
index ea9643d..0000000
--- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php
deleted file mode 100644
index 1a935c0..0000000
--- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php
deleted file mode 100644
index 1a5de0e..0000000
--- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php
deleted file mode 100644
index 6d4f353..0000000
--- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php
deleted file mode 100644
index 9d7c5d7..0000000
--- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php
deleted file mode 100644
index 34078d0..0000000
--- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php
deleted file mode 100644
index 0816b0f..0000000
--- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php
deleted file mode 100644
index 87090eb..0000000
--- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php
deleted file mode 100644
index 3aca86a..0000000
--- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php
deleted file mode 100644
index c3d65b4..0000000
--- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php
+++ /dev/null
@@ -1,142 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php
deleted file mode 100644
index 00f7163..0000000
--- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\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');
- }
-}