File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 18
18
namespace PhpOffice \PhpWordTests ;
19
19
20
20
use BadMethodCallException ;
21
+ use DateTimeImmutable ;
21
22
use PhpOffice \PhpWord \Metadata \DocInfo ;
22
23
use PhpOffice \PhpWord \PhpWord ;
23
24
use PhpOffice \PhpWord \Settings ;
@@ -35,8 +36,14 @@ class PhpWordTest extends \PHPUnit\Framework\TestCase
35
36
*/
36
37
public function testConstruct (): void
37
38
{
38
- $ phpWord = new PhpWord ();
39
- self ::assertEquals (new DocInfo (), $ phpWord ->getDocInfo ());
39
+ do {
40
+ $ dtStart = new DateTimeImmutable ();
41
+ $ startSecond = $ dtStart ->format ('s ' );
42
+ $ phpWord = new PhpWord ();
43
+ $ docInfo = new DocInfo ();
44
+ $ endSecond = (new DateTimeImmutable ('now ' ))->format ('s ' );
45
+ } while ($ startSecond !== $ endSecond );
46
+ self ::assertEquals ($ docInfo , $ phpWord ->getDocInfo ());
40
47
self ::assertEquals (Settings::DEFAULT_FONT_NAME , $ phpWord ->getDefaultFontName ());
41
48
self ::assertEquals (Settings::DEFAULT_FONT_SIZE , $ phpWord ->getDefaultFontSize ());
42
49
}
You can’t perform that action at this time.
0 commit comments