Issue #3240201 by andypost, daffie: \Drupal\Tests\Component\Gettext\PoStreamWriterTest::setUp() causes deprecations on PHP 8.1

merge-requests/747/merge
catch 2021-10-01 12:12:29 +01:00
parent b9944c2228
commit 91f5fa9ef5
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@
namespace Drupal\Tests\Component\Gettext;
use Drupal\Component\Gettext\PoHeader;
use Drupal\Component\Gettext\PoItem;
use Drupal\Component\Gettext\PoStreamWriter;
use Drupal\Tests\PhpUnitCompatibilityTrait;
@ -37,7 +38,10 @@ class PoStreamWriterTest extends TestCase {
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');