Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TranslatorTest.php

function TranslatorTest::getInterval

File

vendor/symfony/translation-contracts/Test/TranslatorTest.php, line 149

Class

TranslatorTest
Test should cover all languages mentioned on http://translate.sourceforge.net/wiki/l10n/pluralforms and Plural forms mentioned on http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms.

Namespace

Symfony\Contracts\Translation\Test

Code

public static function getInterval() {
    return [
        [
            'foo',
            3,
            '{1,2, 3 ,4}',
        ],
        [
            'bar',
            10,
            '{1,2, 3 ,4}',
        ],
        [
            'bar',
            3,
            '[1,2]',
        ],
        [
            'foo',
            1,
            '[1,2]',
        ],
        [
            'foo',
            2,
            '[1,2]',
        ],
        [
            'bar',
            1,
            ']1,2[',
        ],
        [
            'bar',
            2,
            ']1,2[',
        ],
        [
            'foo',
            log(0),
            '[-Inf,2[',
        ],
        [
            'foo',
            -log(0),
            '[-2,+Inf]',
        ],
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal