Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions phpword.ini.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ outputEscapingEnabled = false

defaultFontName = Arial
defaultFontSize = 10
defaultFontColor = 000000

[Paper]

Expand Down
4 changes: 4 additions & 0 deletions tests/PhpWordTests/SettingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class SettingsTest extends TestCase
{
private $compatibility;

/** @var string */
private $defaultFontColor;

private $defaultFontSize;

private $defaultFontName;
Expand Down Expand Up @@ -287,6 +290,7 @@ public function testLoadConfig(): void
'pdfRendererPath' => '',
'defaultFontName' => 'Arial',
'defaultFontSize' => 10,
'defaultFontColor' => '000000',
'outputEscapingEnabled' => false,
'defaultPaper' => 'A4',
];
Expand Down
5 changes: 5 additions & 0 deletions tests/PhpWordTests/Writer/HTML/FontTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ class FontTest extends \PHPUnit\Framework\TestCase
/** @var float|int */
private $defaultFontSize;

/** @var string */
private $defaultFontColor;

/**
* Executed before each method of the class.
*/
protected function setUp(): void
{
$this->defaultFontName = Settings::getDefaultFontName();
$this->defaultFontSize = Settings::getDefaultFontSize();
$this->defaultFontColor = Settings::getDefaultFontColor();
}

/**
Expand All @@ -49,6 +53,7 @@ protected function tearDown(): void
{
Settings::setDefaultFontName($this->defaultFontName);
Settings::setDefaultFontSize($this->defaultFontSize);
Settings::setDefaultFontColor($this->defaultFontColor);
}

/**
Expand Down