function PoStreamWriterTest::setUp

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

File

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

Class

PoStreamWriterTest
@coversDefaultClass \Drupal\Component\Gettext\PoStreamWriter[[api-linebreak]] @group Gettext

Namespace

Drupal\Tests\Component\Gettext

Code

protected function setUp() : void {
  parent::setUp();
  $poHeader = $this->prophesize(PoHeader::class);
  $poHeader->__toString()
    ->willReturn('');
  $this->poWriter = new PoStreamWriter();
  $this->poWriter
    ->setHeader($poHeader->reveal());
  $root = vfsStream::setup();
  $this->poFile = new vfsStreamFile('poWriter.po');
  $root->addChild($this->poFile);
}

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