Skip to content

Commit

Permalink
add stream option
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Feb 7, 2024
1 parent c166d08 commit 68d32ee
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/SpreadCompatXlsxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,31 @@ public function testNativeCanWriteXlsx()
]);
$this->assertStringContainsString('[Content_Types].xml', $string);
$this->assertNotEquals($string, $string2);

// The same, but with stream
$Native = new Native();
$Native->stream = true;
$string = $Native->writeString([
[
"john", "doe", "john.doe@example.com"
]
]);
$this->assertStringContainsString('[Content_Types].xml', $string);

$Native = new Native();
$string2 = $Native->writeString([
[
"fname", "sname", "email"
],
[
"john", "doe", "john.doe@example.com"
]
], ...[
'autofilter' => 'A1:C1',
'freezePane' => 'A1',
'strea=' => true,
]);
$this->assertStringContainsString('[Content_Types].xml', $string);
$this->assertNotEquals($string, $string2);
}
}

0 comments on commit 68d32ee

Please sign in to comment.