Skip to content

Commit 1b459e9

Browse files
committed
fixed the test
1 parent e7535d3 commit 1b459e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/PhpWordTests/Writer/Word2007/Element/CheckBoxTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ class CheckBoxTest extends TestCase
1515
* @dataProvider checkBoxCheckedProvider
1616
*/
1717
public function testCheckBoxGeneratesCorrectXml(
18+
bool $checked,
1819
string $expectedCheckedAttribute
1920
): void {
2021
// Arrange
2122
$xmlWriter = new XMLWriter();
2223

2324
$checkBoxElement = new CheckBoxElement('test', 'test');
25+
$checkBoxElement->setDefaultChecked($checked);
26+
2427
$checkBox = new CheckBox($xmlWriter, $checkBoxElement);
2528

2629
// Act
@@ -38,9 +41,11 @@ public static function checkBoxCheckedProvider(): array
3841
{
3942
return [
4043
'Default checked' => [
44+
'checked' => true,
4145
'w:default w:val="1"',
4246
],
4347
'Default unchecked' => [
48+
'checked' => false,
4449
'w:default w:val="0"',
4550
],
4651
];

0 commit comments

Comments
 (0)