Skip to content

Commit d3f3f65

Browse files
committed
Should fix "undefined property" ->attributes.
1 parent dab30c7 commit d3f3f65

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/PhpWordTests/Writer/HTML/Element/TableTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function testWriteTableCellVAlign(): void
199199
$cell3Query = $xpath->query('//table/tr/td[3]');
200200
self::assertNotFalse($cell3Query);
201201
self::assertCount(1, $cell3Query);
202-
202+
self::assertObjectHasProperty('attributes', $cell3Query->item(0));
203203
$cell3Style = $cell3Query->item(0)->attributes->getNamedItem('style');
204204
self::assertNull($cell3Style);
205205
}
@@ -232,6 +232,7 @@ public function testWriteTableCellVMerge(): void
232232
$cell3Query = $xpath->query('//table/tr[3]/td[1]');
233233
self::assertNotFalse($cell3Query);
234234
self::assertCount(1, $cell3Query);
235+
self::assertObjectHasProperty('attributes', $cell3Query->item(0));
235236
self::assertNull($cell3Query->item(0)->attributes->getNamedItem('rowspan'));
236237
}
237238
}

0 commit comments

Comments
 (0)