Skip to content

Commit 3649e2a

Browse files
committed
Improve tests
1 parent 2830286 commit 3649e2a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/test.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@
119119
$xlsxFastEditor->writeInt($sheet2, 'C3', -7);
120120
$xlsxFastEditor->writeFloat($sheet2, 'D3', 273.15);
121121

122-
// Test writing special character '&'
123-
$xlsxFastEditor->writeString($sheet2, 'A5', '&');
122+
// Writing special XML characters
123+
$xlsxFastEditor->writeString($sheet2, 'B5', '< " & \' >');
124+
$xlsxFastEditor->writeFormula($sheet2, 'C5', '=LEN("< & \' >")');
124125

125126
// Writing non-existing cells but existing lines
126127
$xlsxFastEditor->writeFormula($sheet2, 'I2', '=7*3');
@@ -169,8 +170,9 @@
169170

170171
assert($xlsxFastEditor->readString($sheet1, 'B2') === 'World');
171172

172-
// Test writing special character '&'
173-
assert($xlsxFastEditor->readString($sheet2, 'A5') === '&');
173+
// Test special XML characters
174+
assert($xlsxFastEditor->readString($sheet2, 'B5') === '< " & \' >');
175+
assert($xlsxFastEditor->readFormula($sheet2, 'C5') === '=LEN("< & \' >")');
174176

175177
$xlsxFastEditor->close();
176178

0 commit comments

Comments
 (0)