You are here

abstract class AbstractOperationTest in Plug 7

Hierarchy

  • class \Symfony\Component\Translation\Tests\Catalogue\AbstractOperationTest extends \Symfony\Component\Translation\Tests\Catalogue\PHPUnit_Framework_TestCase

Expanded class hierarchy of AbstractOperationTest

File

lib/Symfony/translation/Tests/Catalogue/AbstractOperationTest.php, line 17

Namespace

Symfony\Component\Translation\Tests\Catalogue
View source
abstract class AbstractOperationTest extends \PHPUnit_Framework_TestCase {
  public function testGetEmptyDomains() {
    $this
      ->assertEquals(array(), $this
      ->createOperation(new MessageCatalogue('en'), new MessageCatalogue('en'))
      ->getDomains());
  }
  public function testGetMergedDomains() {
    $this
      ->assertEquals(array(
      'a',
      'b',
      'c',
    ), $this
      ->createOperation(new MessageCatalogue('en', array(
      'a' => array(),
      'b' => array(),
    )), new MessageCatalogue('en', array(
      'b' => array(),
      'c' => array(),
    )))
      ->getDomains());
  }
  public function testGetMessagesFromUnknownDomain() {
    $this
      ->setExpectedException('InvalidArgumentException');
    $this
      ->createOperation(new MessageCatalogue('en'), new MessageCatalogue('en'))
      ->getMessages('domain');
  }
  public function testGetEmptyMessages() {
    $this
      ->assertEquals(array(), $this
      ->createOperation(new MessageCatalogue('en', array(
      'a' => array(),
    )), new MessageCatalogue('en'))
      ->getMessages('a'));
  }
  public function testGetEmptyResult() {
    $this
      ->assertEquals(new MessageCatalogue('en'), $this
      ->createOperation(new MessageCatalogue('en'), new MessageCatalogue('en'))
      ->getResult());
  }
  protected abstract function createOperation(MessageCatalogueInterface $source, MessageCatalogueInterface $target);

}

Members