Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add removeCommentByColumnAndRow function #2875

Merged
merged 10 commits into from
Jun 14, 2022
Prev Previous commit
Next Next commit
Update the method testRemoveComment
Adding test to check if comment exists before delete it
dgeppo authored Jun 14, 2022
commit 7f62fba7ef95891967a99e745e71bfac689a2fc4
1 change: 1 addition & 0 deletions tests/PhpSpreadsheetTests/CommentTest.php
Original file line number Diff line number Diff line change
@@ -89,6 +89,7 @@ public function testRemoveComment(): void {
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->getComment('A2')->getText()->createText('Comment to delete');
self::assertArrayHasKey('A2',$sheet->getComments());
$sheet->removeComment('A2');
self::assertEmpty($sheet->getComments());
}