You are here

public function DiffOperationTest::testGetMessagesFromSingleDomain in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/translation/Tests/Catalogue/DiffOperationTest.php \Symfony\Component\Translation\Tests\Catalogue\DiffOperationTest::testGetMessagesFromSingleDomain()

File

vendor/symfony/translation/Tests/Catalogue/DiffOperationTest.php, line 20

Class

DiffOperationTest

Namespace

Symfony\Component\Translation\Tests\Catalogue

Code

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'));
}