File tree 2 files changed +2
-3
lines changed
tests/PhpWordTests/Writer
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public function testWrite(): void
32
32
self ::assertStringContainsString ('xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" ' , $ result );
33
33
self ::assertStringContainsString ('xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" ' , $ result );
34
34
self ::assertStringContainsString ('xmlns:xlink="http://www.w3.org/1999/xlink" ' , $ result );
35
- self ::assertStringContainsString ('<office:scripts> ' , $ result );
35
+ self ::assertStringContainsString ('<office:scripts/ > ' , $ result );
36
36
self ::assertStringContainsString ('<office:font-face-decls> ' , $ result );
37
37
self ::assertStringContainsString ('<style:font-face style:name="Arial" svg:font-family="Arial" ' , $ result );
38
38
self ::assertStringContainsString ('<office:automatic-styles> ' , $ result );
Original file line number Diff line number Diff line change @@ -64,8 +64,7 @@ public function testWithMedia(): void
64
64
$ section = $ phpWord ->addSection ();
65
65
66
66
// Add an image to the document
67
- // Correct the relative path and check if realpath returns a valid path
68
- $ imagePath = realpath (__DIR__ . 'tests/PhpWordTests/_files/images/earth.jpg ' );
67
+ $ imagePath = realpath ('tests/PhpWordTests/_files/images/earth.jpg ' );
69
68
self ::assertIsString ($ imagePath , 'Test image file not found or accessible at the expected location. ' ); // Ensure path is valid string
70
69
self ::assertFileExists ($ imagePath , "Test image file not found at: {$ imagePath }" ); // Use validated path
71
70
$ section ->addImage ($ imagePath ); // Use validated path
You can’t perform that action at this time.
0 commit comments