Skip to content

Commit 3bf29c7

Browse files
dependabot[bot]Progi1984
authored andcommitted
Bump phpstan/phpstan-phpunit from 1.3.14 to 1.3.15
Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit) from 1.3.14 to 1.3.15. - [Release notes](https://github.com/phpstan/phpstan-phpunit/releases) - [Commits](phpstan/phpstan-phpunit@1.3.14...1.3.15) --- updated-dependencies: - dependency-name: phpstan/phpstan-phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
1 parent b85f32c commit 3bf29c7

File tree

4 files changed

+36
-31
lines changed

4 files changed

+36
-31
lines changed

composer.lock

Lines changed: 12 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/changes/1.x/1.2.0.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@
4040
- Bump mpdf/mpdf from 8.1.6 to 8.2.0 by [@dependabot](https://github.com/dependabot) in [#2480](https://github.com/PHPOffice/PHPWord/pull/2480)
4141
- Bump phpunit/phpunit from 9.6.11 to 9.6.13 by [@dependabot](https://github.com/dependabot) in [#2481](https://github.com/PHPOffice/PHPWord/pull/2481)
4242
- Bump tecnickcom/tcpdf from 6.6.2 to 6.6.5 by [@dependabot](https://github.com/dependabot) in [#2482](https://github.com/PHPOffice/PHPWord/pull/2482)
43-
- Bump phpmd/phpmd from 2.13.0 to 2.14.1 by [@dependabot](https://github.com/dependabot) in [#2483](https://github.com/PHPOffice/PHPWord/pull/2483)
43+
- Bump phpmd/phpmd from 2.13.0 to 2.14.1 by [@dependabot](https://github.com/dependabot) in [#2483](https://github.com/PHPOffice/PHPWord/pull/2483)
44+
- Bump phpstan/phpstan-phpunit from 1.3.14 to 1.3.15 by [@dependabot](https://github.com/dependabot) in [#2494](https://github.com/PHPOffice/PHPWord/pull/2494)

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,11 +1690,6 @@ parameters:
16901690
count: 1
16911691
path: tests/PhpWordTests/PhpWordTest.php
16921692

1693-
-
1694-
message: "#^Call to an undefined method PhpOffice\\\\PhpWord\\\\Element\\\\AbstractElement\\:\\:getElements\\(\\)\\.$#"
1695-
count: 1
1696-
path: tests/PhpWordTests/Reader/Word2007/ElementTest.php
1697-
16981693
-
16991694
message: "#^Call to an undefined method PhpOffice\\\\PhpWord\\\\Element\\\\AbstractElement\\:\\:getRows\\(\\)\\.$#"
17001695
count: 1

tests/PhpWordTests/Reader/Word2007/ElementTest.php

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717

1818
namespace PhpOffice\PhpWordTests\Reader\Word2007;
1919

20+
use PhpOffice\PhpWord\Element\Text;
2021
use PhpOffice\PhpWord\Element\TrackChange;
22+
use PhpOffice\PhpWord\Style\Font;
2123
use PhpOffice\PhpWordTests\AbstractTestReader;
2224

2325
/**
@@ -60,7 +62,7 @@ public function testReadAlternateContent(): void
6062

6163
$elements = $phpWord->getSection(0)->getElements();
6264
self::assertInstanceOf('PhpOffice\PhpWord\Element\TextRun', $elements[0]);
63-
self::assertInstanceOf('PhpOffice\PhpWord\Element\Text', $elements[0]->getElement(0));
65+
self::assertInstanceOf(Text::class, $elements[0]->getElement(0));
6466
$text = $elements[0];
6567
self::assertEquals('Test node value', trim($text->getElement(0)->getText()));
6668
}
@@ -84,7 +86,7 @@ public function testReadTextBreak(): void
8486
/** @var \PhpOffice\PhpWord\Element\TextRun $textRun */
8587
$textRun = $elements[0];
8688
self::assertInstanceOf('PhpOffice\PhpWord\Element\TextBreak', $textRun->getElement(0));
87-
self::assertInstanceOf('PhpOffice\PhpWord\Element\Text', $textRun->getElement(1));
89+
self::assertInstanceOf(Text::class, $textRun->getElement(1));
8890
self::assertEquals('test string', $textRun->getElement(1)->getText());
8991
}
9092

@@ -107,7 +109,7 @@ public function testSmartTag(): void
107109
self::assertInstanceOf('PhpOffice\PhpWord\Element\TextRun', $elements[0]);
108110
/** @var \PhpOffice\PhpWord\Element\TextRun $textRun */
109111
$textRun = $elements[0];
110-
self::assertInstanceOf('PhpOffice\PhpWord\Element\Text', $textRun->getElement(0));
112+
self::assertInstanceOf(Text::class, $textRun->getElement(0));
111113
self::assertEquals('test string', $textRun->getElement(0)->getText());
112114
}
113115

@@ -145,11 +147,20 @@ public function testReadListItemRunWithFormatting(): void
145147
self::assertEquals(0, $sections->getElement(0)->getDepth());
146148

147149
$listElements = $sections->getElement(0)->getElements();
148-
self::assertInstanceOf('PhpOffice\PhpWord\Element\Text', $listElements[0]);
149-
self::assertEquals('Two', $listElements[0]->getText());
150-
self::assertEquals(' with ', $listElements[1]->getText());
151-
self::assertEquals('bold', $listElements[2]->getText());
152-
self::assertTrue($listElements[2]->getFontStyle()->isBold());
150+
/** @var Text $listElement0 */
151+
$listElement0 = $listElements[0];
152+
self::assertInstanceOf(Text::class, $listElement0);
153+
self::assertEquals('Two', $listElement0->getText());
154+
/** @var Text $listElement1 */
155+
$listElement1 = $listElements[1];
156+
self::assertEquals(' with ', $listElement1->getText());
157+
/** @var Text $listElement2 */
158+
$listElement2 = $listElements[2];
159+
self::assertEquals('bold', $listElement2->getText());
160+
/** @var Font $listElement2FontStyle */
161+
$listElement2FontStyle = $listElement2->getFontStyle();
162+
self::assertInstanceOf(Font::class, $listElement2FontStyle);
163+
self::assertTrue($listElement2FontStyle->isBold());
153164
}
154165

155166
/**
@@ -214,11 +225,11 @@ public function testReadTab(): void
214225
self::assertInstanceOf('PhpOffice\PhpWord\Element\TextRun', $elements[0]);
215226
/** @var \PhpOffice\PhpWord\Element\TextRun $textRun */
216227
$textRun = $elements[0];
217-
self::assertInstanceOf('PhpOffice\PhpWord\Element\Text', $textRun->getElement(0));
228+
self::assertInstanceOf(Text::class, $textRun->getElement(0));
218229
self::assertEquals('One', $textRun->getElement(0)->getText());
219-
self::assertInstanceOf('PhpOffice\PhpWord\Element\Text', $textRun->getElement(1));
230+
self::assertInstanceOf(Text::class, $textRun->getElement(1));
220231
self::assertEquals("\t", $textRun->getElement(1)->getText());
221-
self::assertInstanceOf('PhpOffice\PhpWord\Element\Text', $textRun->getElement(2));
232+
self::assertInstanceOf(Text::class, $textRun->getElement(2));
222233
self::assertEquals('Two', $textRun->getElement(2)->getText());
223234
}
224235

0 commit comments

Comments
 (0)