Skip to content

Commit 7f62fba

Browse files
authored
Update the method testRemoveComment
Adding test to check if comment exists before delete it
1 parent 861b955 commit 7f62fba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/PhpSpreadsheetTests/CommentTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public function testRemoveComment(): void {
8989
$spreadsheet = new Spreadsheet();
9090
$sheet = $spreadsheet->getActiveSheet();
9191
$sheet->getComment('A2')->getText()->createText('Comment to delete');
92+
self::assertArrayHasKey('A2',$sheet->getComments());
9293
$sheet->removeComment('A2');
9394
self::assertEmpty($sheet->getComments());
9495
}

0 commit comments

Comments
 (0)