You are here

public function MessageCatalogueTest::testHas in Plug 7

File

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