File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
tests/PhpWordTests/Writer/Word2007/Element Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 15
15
*
16
16
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
17
17
*/
18
+
18
19
declare (strict_types=1 );
19
20
20
21
namespace PhpOffice \PhpWordTests \Writer \Word2007 \Element ;
@@ -72,12 +73,12 @@ public function testWriteTitleWithoutpageNumber(): void
72
73
73
74
$ doc = TestHelperDOCX::getDocument ($ phpWord );
74
75
75
- for ($ i = 1 ; $ i <= 1 ; $ i ++) {
76
+ for ($ i = 1 ; $ i <= 10 ; $ i ++) {
76
77
self ::assertTrue ($ doc ->elementExists ('/w:document/w:body/w:p[ ' . $ i . ']/w:hyperlink/w:r[1]/w:t ' ));
77
78
self ::assertEquals ('Title ' . $ i , $ doc ->getElement ('/w:document/w:body/w:p[ ' . $ i . ']/w:hyperlink/w:r[1]/w:t ' )->textContent );
78
79
self ::assertTrue ($ doc ->elementExists ('/w:document/w:body/w:p[ ' . $ i . ']/w:hyperlink/w:r[4]/w:instrText ' ));
79
80
self ::assertEquals ('preserve ' , $ doc ->getElementAttribute ('/w:document/w:body/w:p[ ' . $ i . ']/w:hyperlink/w:r[4]/w:instrText ' , 'xml:space ' ));
80
- self ::assertEquals ('PAGEREF \\h ' , $ doc ->getElement ('/w:document/w:body/w:p[ ' . $ i . ']/w:hyperlink/w:r[4]/w:instrText ' )->nodeValue );
81
+ self ::assertEquals ('PAGEREF ' . ( $ i - 1 ) . ' \\h ' , $ doc ->getElement ('/w:document/w:body/w:p[ ' . $ i . ']/w:hyperlink/w:r[4]/w:instrText ' )->nodeValue );
81
82
}
82
83
}
83
84
}
You can’t perform that action at this time.
0 commit comments