Skip to content

Commit

Permalink
Merge pull request #3 from MichaelPFrey/fix-mfr-2024-11-22
Browse files Browse the repository at this point in the history
debuging the tests
  • Loading branch information
Collie-IT authored Nov 22, 2024
2 parents c2afe42 + 8aaa00f commit a2fac74
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
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

0 comments on commit a2fac74

Please sign in to comment.