Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Invalid Annotation in Test Member #2549

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/PhpWordTests/Element/FormulaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
class FormulaTest extends AbstractWebServerEmbeddedTest
{
/**
* @covers \Formula::__construct
* @covers \PhpOffice\PhpWord\Element\Formula::__construct
*/
public function testConstruct(): void
{
Expand All @@ -40,8 +40,8 @@ public function testConstruct(): void
}

/**
* @covers \Formula::getMath
* @covers \Formula::setMath
* @covers \PhpOffice\PhpWord\Element\Formula::getMath
* @covers \PhpOffice\PhpWord\Element\Formula::setMath
*/
public function testMath(): void
{
Expand Down
11 changes: 9 additions & 2 deletions tests/PhpWordTests/PhpWordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
namespace PhpOffice\PhpWordTests;

use BadMethodCallException;
use DateTimeImmutable;
use PhpOffice\PhpWord\Metadata\DocInfo;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Settings;
Expand All @@ -35,8 +36,14 @@ class PhpWordTest extends \PHPUnit\Framework\TestCase
*/
public function testConstruct(): void
{
$phpWord = new PhpWord();
self::assertEquals(new DocInfo(), $phpWord->getDocInfo());
do {
$dtStart = new DateTimeImmutable();
$startSecond = $dtStart->format('s');
$phpWord = new PhpWord();
$docInfo = new DocInfo();
$endSecond = (new DateTimeImmutable('now'))->format('s');
} while ($startSecond !== $endSecond);
self::assertEquals($docInfo, $phpWord->getDocInfo());
self::assertEquals(Settings::DEFAULT_FONT_NAME, $phpWord->getDefaultFontName());
self::assertEquals(Settings::DEFAULT_FONT_SIZE, $phpWord->getDefaultFontSize());
}
Expand Down
Loading