@@ -150,6 +150,33 @@ public function testParseFontSize()
150
150
$ this ->assertEquals ('15 ' , $ doc ->getElementAttribute ('/w:document/w:body/w:p[2]/w:r/w:rPr/w:sz ' , 'w:val ' ));
151
151
}
152
152
153
+ /**
154
+ * Test direction style
155
+ */
156
+ public function testParseTextDirection ()
157
+ {
158
+ $ phpWord = new \PhpOffice \PhpWord \PhpWord ();
159
+ $ section = $ phpWord ->addSection ();
160
+ Html::addHtml ($ section , '<span style="direction: rtl">test</span> ' );
161
+
162
+ $ doc = TestHelperDOCX::getDocument ($ phpWord , 'Word2007 ' );
163
+ $ this ->assertTrue ($ doc ->elementExists ('/w:document/w:body/w:p/w:r/w:rPr/w:rtl ' ));
164
+ }
165
+
166
+ /**
167
+ * Test html lang
168
+ */
169
+ public function testParseLang ()
170
+ {
171
+ $ phpWord = new \PhpOffice \PhpWord \PhpWord ();
172
+ $ section = $ phpWord ->addSection ();
173
+ Html::addHtml ($ section , '<span lang="fr-BE">test</span> ' );
174
+
175
+ $ doc = TestHelperDOCX::getDocument ($ phpWord , 'Word2007 ' );
176
+ $ this ->assertTrue ($ doc ->elementExists ('/w:document/w:body/w:p/w:r/w:rPr/w:lang ' ));
177
+ $ this ->assertEquals ('fr-BE ' , $ doc ->getElementAttribute ('/w:document/w:body/w:p/w:r/w:rPr/w:lang ' , 'w:val ' ));
178
+ }
179
+
153
180
/**
154
181
* Test font-family style
155
182
*/
@@ -199,7 +226,7 @@ public function testParseTable()
199
226
</thead>
200
227
<tbody>
201
228
<tr><td style="border-style: dotted;">1</td><td colspan="2">2</td></tr>
202
- <tr><td>4</ td><td>5</td><td>6 </td></tr>
229
+ <tr><td>This is <b>bold</b> text</ td><td>5</td><td><p>6</p> </td></tr>
203
230
</tbody>
204
231
</table> ' ;
205
232
Html::addHtml ($ section , $ html );
0 commit comments