@@ -68,21 +68,58 @@ public function testCompatibility()
6868 $ this ->assertEquals ($ phpWord ->getCompatibility ()->getOoxmlVersion (), 15 );
6969 }
7070
71+ /**
72+ * Test language
73+ */
74+ public function testLanguage ()
75+ {
76+ $ phpWord = new PhpWord ();
77+
78+ $ doc = TestHelperDOCX::getDocument ($ phpWord );
79+
80+ $ file = 'word/settings.xml ' ;
81+
82+ $ path = '/w:settings/w:themeFontLang ' ;
83+ $ this ->assertTrue ($ doc ->elementExists ($ path , $ file ));
84+ $ element = $ doc ->getElement ($ path , $ file );
85+
86+ $ this ->assertEquals ('en-US ' , $ element ->getAttribute ('w:val ' ));
87+ }
88+
89+ /**
90+ * Test spelling
91+ */
92+ public function testSpelling ()
93+ {
94+ $ phpWord = new PhpWord ();
95+ Settings::setSpellingErrorsHidden (true );
96+
97+ $ doc = TestHelperDOCX::getDocument ($ phpWord );
98+
99+ $ file = 'word/settings.xml ' ;
100+
101+ $ path = '/w:settings/w:hideSpellingErrors ' ;
102+ $ this ->assertTrue ($ doc ->elementExists ($ path , $ file ));
103+ $ element = $ doc ->getElement ($ path , $ file );
104+
105+ $ this ->assertEquals ('true ' , $ element ->getAttribute ('w:val ' ));
106+ }
107+
71108 /**
72109 * Test even and odd headers
73110 */
74111 public function testEvenAndOddHeaders ()
75112 {
76113 $ phpWord = new PhpWord ();
77114 Settings::setEvenAndOddHeaders (true );
78-
115+
79116 $ doc = TestHelperDOCX::getDocument ($ phpWord );
80-
117+
81118 $ file = 'word/settings.xml ' ;
82-
119+
83120 $ path = '/w:settings/w:evenAndOddHeaders ' ;
84121 $ this ->assertTrue ($ doc ->elementExists ($ path , $ file ));
85-
122+
86123 $ element = $ doc ->getElement ($ path , $ file );
87124 $ this ->assertEquals ('true ' , $ element ->getAttribute ('w:val ' ));
88125 }
0 commit comments