mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-30 20:18:00 +00:00
Update the method testRemoveComment
Adding test to check if comment exists before delete it
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user