Skip to content

Commit 56ddbc4

Browse files
authored
Add testRemoveComment
1 parent 1343738 commit 56ddbc4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/PhpSpreadsheetTests/CommentTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,12 @@ public function testSetText(): void
8383
$comment->setText($test);
8484
self::assertEquals('This is a test comment', (string) $comment);
8585
}
86+
87+
public function testRemoveComment(): void {
88+
$spreadsheet = new Spreadsheet();
89+
$sheet = $spreadsheet->getActiveSheet();
90+
$sheet->getComment('A2')->getText()->createText('Comment to delete');
91+
$sheet->removeComment('A2');
92+
self::assertEmpty($sheet->getComments());
93+
}
8694
}

0 commit comments

Comments
 (0)