Update the method testRemoveComment

Adding test to check if comment exists before delete it
This commit is contained in:
Dams 2022-06-14 10:44:42 +02:00 committed by GitHub
parent 861b955b3b
commit 7f62fba7ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -89,6 +89,7 @@ class CommentTest extends TestCase
$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());
}