function PoStreamWriterTest::providerWriteData

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php \Drupal\Tests\Component\Gettext\PoStreamWriterTest::providerWriteData()
  2. 10 core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php \Drupal\Tests\Component\Gettext\PoStreamWriterTest::providerWriteData()
  3. 11.x core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php \Drupal\Tests\Component\Gettext\PoStreamWriterTest::providerWriteData()

Return value

array

  • Content to write.
  • Written content.
  • Content longer than 10 bytes.

File

core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php, line 82

Class

PoStreamWriterTest
@coversDefaultClass \Drupal\Component\Gettext\PoStreamWriter @group Gettext

Namespace

Drupal\Tests\Component\Gettext

Code

public function providerWriteData() {
    return [
        [
            '',
            '',
            FALSE,
        ],
        [
            "\r\n",
            "\r\n",
            FALSE,
        ],
        [
            'write this if you can',
            'write this',
            TRUE,
        ],
        [
            'éáíó>&',
            'éáíó>&',
            FALSE,
        ],
        [
            'éáíó>&<',
            'éáíó>&',
            TRUE,
        ],
        [
            '中文 890',
            '中文 890',
            FALSE,
        ],
        [
            '中文 89012',
            '中文 890',
            TRUE,
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.