Skip to content

Commit 76ab10b

Browse files
authored
Update FontTest.php
1 parent 3c34abf commit 76ab10b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/PhpWordTests/Writer/RTF/Style/FontTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ public function testFontColorRegistered(): void
7070
$phpWord = new \PhpOffice\PhpWord\PhpWord();
7171
$parentWriter = new RTF($phpWord);
7272
$style = new FontStyle();
73-
$writer = new FontWriter($style);
74-
$writer->setParentWriter($parentWriter);
7573

7674
$style->setName('Times New Roman');
7775
$style->setFallbackFont('serif');
@@ -83,6 +81,8 @@ public function testFontColorRegistered(): void
8381
$phpWord->addFontStyle('style1', $style);
8482
$parentWriter->getWriterPart('Header')->write();
8583

84+
$writer = new FontWriter($style);
85+
$writer->setParentWriter($parentWriter);
8686
$expect = '\f0\fs48\cf0\highlight0\cb0 ';
8787
self::assertEquals($expect, $this->removeCr($writer));
8888
}

0 commit comments

Comments
 (0)