You are here

public function MessageCatalogueTest::testHas in Zircon Profile 8

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

File

vendor/symfony/translation/Tests/MessageCatalogueTest.php, line 41

Class

MessageCatalogueTest

Namespace

Symfony\Component\Translation\Tests

Code

public function testHas() {
  $catalogue = new MessageCatalogue('en', array(
    'domain1' => array(
      'foo' => 'foo',
    ),
    'domain2' => array(
      'bar' => 'bar',
    ),
  ));
  $this
    ->assertTrue($catalogue
    ->has('foo', 'domain1'));
  $this
    ->assertFalse($catalogue
    ->has('bar', 'domain1'));
  $this
    ->assertFalse($catalogue
    ->has('foo', 'domain88'));
}