You are here

public function TranslatorTest::dataProviderGetMessages in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/translation/Tests/TranslatorTest.php \Symfony\Component\Translation\Tests\TranslatorTest::dataProviderGetMessages()

File

vendor/symfony/translation/Tests/TranslatorTest.php, line 521

Class

TranslatorTest

Namespace

Symfony\Component\Translation\Tests

Code

public function dataProviderGetMessages() {
  $resources = array(
    'en' => array(
      'jsmessages' => array(
        'foo' => 'foo (EN)',
        'bar' => 'bar (EN)',
      ),
      'messages' => array(
        'foo' => 'foo messages (EN)',
      ),
      'validators' => array(
        'int' => 'integer (EN)',
      ),
    ),
    'pt-PT' => array(
      'messages' => array(
        'foo' => 'foo messages (PT)',
      ),
      'validators' => array(
        'str' => 'integer (PT)',
      ),
    ),
    'pt_BR' => array(
      'validators' => array(
        'int' => 'integer (BR)',
      ),
    ),
  );
  return array(
    array(
      $resources,
      null,
      array(
        'jsmessages' => array(
          'foo' => 'foo (EN)',
          'bar' => 'bar (EN)',
        ),
        'messages' => array(
          'foo' => 'foo messages (EN)',
        ),
        'validators' => array(
          'int' => 'integer (EN)',
        ),
      ),
    ),
    array(
      $resources,
      'en',
      array(
        'jsmessages' => array(
          'foo' => 'foo (EN)',
          'bar' => 'bar (EN)',
        ),
        'messages' => array(
          'foo' => 'foo messages (EN)',
        ),
        'validators' => array(
          'int' => 'integer (EN)',
        ),
      ),
    ),
    array(
      $resources,
      'pt-PT',
      array(
        'jsmessages' => array(
          'foo' => 'foo (EN)',
          'bar' => 'bar (EN)',
        ),
        'messages' => array(
          'foo' => 'foo messages (PT)',
        ),
        'validators' => array(
          'int' => 'integer (EN)',
          'str' => 'integer (PT)',
        ),
      ),
    ),
    array(
      $resources,
      'pt_BR',
      array(
        'jsmessages' => array(
          'foo' => 'foo (EN)',
          'bar' => 'bar (EN)',
        ),
        'messages' => array(
          'foo' => 'foo messages (PT)',
        ),
        'validators' => array(
          'int' => 'integer (BR)',
          'str' => 'integer (PT)',
        ),
      ),
    ),
  );
}