File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
tests/PhpWordTests/Writer/Word2007/Element Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff 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 ];
You can’t perform that action at this time.
0 commit comments