protected function PoStreamWriterTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php \Drupal\Tests\Component\Gettext\PoStreamWriterTest::setUp()
- 9 core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php \Drupal\Tests\Component\Gettext\PoStreamWriterTest::setUp()
File
- core/
tests/ Drupal/ Tests/ Component/ Gettext/ PoStreamWriterTest.php, line 38
Class
- PoStreamWriterTest
- @coversDefaultClass \Drupal\Component\Gettext\PoStreamWriter @group Gettext
Namespace
Drupal\Tests\Component\GettextCode
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);
}