8000 [Translation] [FrameworkBundle] Translation: Optimized loading (lazy loading) of domains by pulzarraider · Pull Request #2570 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Translation] [FrameworkBundle] Translation: Optimized loading (lazy loading) of domains #2570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
CS fix
  • Loading branch information
pulzarraider committed Apr 12, 2012
commit fb137f222c3f37adf905b03cf6b5c18c463e7ac7
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
<?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');
$catalogue->add(array('foo' => 'bar', 'key' => ''));
$tempDir = sys_get_temp_dir();
$dumper = new XliffFileDumper();
$dumperString = $dumper->dump($catalogue, array('path' => $tempDir));
$this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources-clean.xlf'), file_get_contents($tempDir.'/en/messages.xlf'));
unlink($tempDir.'/en/messages.xlf');
rmdir($tempDir.'/en');
}
}
<?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');
$catalogue->add(array('foo' => 'bar', 'key' => ''));

$tempDir = sys_get_temp_dir();
$dumper = new Xlif 4BAD fFileDumper();
$dumperString = $dumper->dump($catalogue, array('path' => $tempDir));

$this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources-clean.xlf'), file_get_contents($tempDir.'/en/messages.xlf'));

unlink($tempDir.'/en/messages.xlf');
rmdir($tempDir.'/en');
}
}
0