diff --git a/tests/PhpSpreadsheetTests/CommentTest.php b/tests/PhpSpreadsheetTests/CommentTest.php index e58afad4..1d7825f4 100644 --- a/tests/PhpSpreadsheetTests/CommentTest.php +++ b/tests/PhpSpreadsheetTests/CommentTest.php @@ -83,4 +83,12 @@ class CommentTest extends TestCase $comment->setText($test); self::assertEquals('This is a test comment', (string) $comment); } + + public function testRemoveComment(): void { + $spreadsheet = new Spreadsheet(); + $sheet = $spreadsheet->getActiveSheet(); + $sheet->getComment('A2')->getText()->createText('Comment to delete'); + $sheet->removeComment('A2'); + self::assertEmpty($sheet->getComments()); + } }