SymfonyComponentTranslationTestsDumperYamlFileDumperTest

The Simple Calendar Symfony Component Translation Tests Dumper YamlFileDumperTest class.

Defined (1)

The class is defined in the following location(s).

/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php  
  1. class YamlFileDumperTest extends \PHPUnit_Framework_TestCase 
  2. public function testTreeFormatCatalogue() 
  3. $catalogue = new MessageCatalogue('en'); 
  4. $catalogue->add( 
  5. array( 
  6. 'foo.bar1' => 'value1',  
  7. 'foo.bar2' => 'value2',  
  8. )); 
  9.  
  10. $dumper = new YamlFileDumper(); 
  11.  
  12. $this->assertStringEqualsFile(__DIR__.'/../fixtures/messages.yml', $dumper->formatCatalogue($catalogue, 'messages', array('as_tree' => true, 'inline' => 999))); 
  13.  
  14. public function testLinearFormatCatalogue() 
  15. $catalogue = new MessageCatalogue('en'); 
  16. $catalogue->add( 
  17. array( 
  18. 'foo.bar1' => 'value1',  
  19. 'foo.bar2' => 'value2',  
  20. )); 
  21.  
  22. $dumper = new YamlFileDumper(); 
  23.  
  24. $this->assertStringEqualsFile(__DIR__.'/../fixtures/messages_linear.yml', $dumper->formatCatalogue($catalogue, 'messages'));