diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-05-11 15:02:33 +0200 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-05-11 15:02:33 +0200 |
| commit | a7e17cb70e9306f8887bd2b5ca1a37edcbe3ea0f (patch) | |
| tree | bf6e04c9bdba66e249fd6b78391e132da130848c /Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper | |
| parent | ea3fed0df4eaedd820f3f405502b62efe5952f8f (diff) | |
| download | InternetTechnologien-a7e17cb70e9306f8887bd2b5ca1a37edcbe3ea0f.tar.gz InternetTechnologien-a7e17cb70e9306f8887bd2b5ca1a37edcbe3ea0f.zip | |
Let composer manage its own files
Diffstat (limited to 'Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper')
11 files changed, 0 insertions, 408 deletions
diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php deleted file mode 100644 index 29177ff..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php +++ /dev/null @@ -1,33 +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\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php deleted file mode 100644 index 9682089..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.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\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php deleted file mode 100644 index 7be7dfb..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php +++ /dev/null @@ -1,38 +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\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php deleted file mode 100644 index 2a2cefd..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php +++ /dev/null @@ -1,32 +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\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php deleted file mode 100644 index 697cd93..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php +++ /dev/null @@ -1,36 +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\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php deleted file mode 100644 index 439a25c..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php +++ /dev/null @@ -1,31 +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\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php deleted file mode 100644 index 18be5a0..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php +++ /dev/null @@ -1,32 +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\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php deleted file mode 100644 index 0296d6b..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php +++ /dev/null @@ -1,31 +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\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php deleted file mode 100644 index d7d8fb7..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php +++ /dev/null @@ -1,32 +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\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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php deleted file mode 100644 index dff2cc4..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php +++ /dev/null @@ -1,41 +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\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' => '<source> & <target>', - )); - $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/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php deleted file mode 100644 index 3c68ade..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php +++ /dev/null @@ -1,32 +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\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'); - } -} |
