@@ -59,6 +59,7 @@ class SettingsTest extends TestCase
5959 protected function setUp (): void
6060 {
6161 $ this ->compatibility = Settings::hasCompatibility ();
62+ $ this ->defaultFontColor = Settings::getDefaultFontColor ();
6263 $ this ->defaultFontSize = Settings::getDefaultFontSize ();
6364 $ this ->defaultFontName = Settings::getDefaultFontName ();
6465 $ this ->defaultPaper = Settings::getDefaultPaper ();
@@ -75,6 +76,7 @@ protected function setUp(): void
7576 protected function tearDown (): void
7677 {
7778 Settings::setCompatibility ($ this ->compatibility );
79+ Settings::setDefaultFontColor ($ this ->defaultFontColor );
7880 Settings::setDefaultFontSize ($ this ->defaultFontSize );
7981 Settings::setDefaultFontName ($ this ->defaultFontName );
8082 Settings::setDefaultPaper ($ this ->defaultPaper );
@@ -236,6 +238,20 @@ public function testSetGetDefaultFontSize(): void
236238 self ::assertEquals (12.5 , Settings::getDefaultFontSize ());
237239 }
238240
241+ /**
242+ * Test set/get default font color.
243+ */
244+ public function testSetGetDefaultFontColor (): void
245+ {
246+ self ::assertEquals (Settings::DEFAULT_FONT_COLOR , Settings::getDefaultFontColor ());
247+ self ::assertFalse (Settings::setDefaultFontColor (' ' ));
248+ self ::assertEquals (Settings::DEFAULT_FONT_COLOR , Settings::getDefaultFontColor ());
249+ self ::assertTrue (Settings::setDefaultFontColor ('FF0000 ' ));
250+ self ::assertEquals ('FF0000 ' , Settings::getDefaultFontColor ());
251+ self ::assertFalse (Settings::setDefaultFontColor (' ' ));
252+ self ::assertEquals ('FF0000 ' , Settings::getDefaultFontColor ());
253+ }
254+
239255 /**
240256 * Test set/get default paper.
241257 */
0 commit comments