generated from jric11/baseProject
Codex's updates...
This commit is contained in:
+15
-6
@@ -24,7 +24,9 @@ final class CallbackOutputTest extends TestCase
|
||||
$buf = '';
|
||||
$zip = new ZipStream(
|
||||
outputStream: CallbackStreamWrapper::open(
|
||||
static function (string $chunk) use (&$buf): void { $buf .= $chunk; }
|
||||
static function (string $chunk) use (&$buf): void {
|
||||
$buf .= $chunk;
|
||||
}
|
||||
),
|
||||
sendHttpHeaders: false
|
||||
);
|
||||
@@ -53,10 +55,14 @@ final class CallbackOutputTest extends TestCase
|
||||
$buf2 = '';
|
||||
|
||||
$stream1 = CallbackStreamWrapper::open(
|
||||
static function (string $chunk) use (&$buf1): void { $buf1 .= $chunk; }
|
||||
static function (string $chunk) use (&$buf1): void {
|
||||
$buf1 .= $chunk;
|
||||
}
|
||||
);
|
||||
$stream2 = CallbackStreamWrapper::open(
|
||||
static function (string $chunk) use (&$buf2): void { $buf2 .= $chunk; }
|
||||
static function (string $chunk) use (&$buf2): void {
|
||||
$buf2 .= $chunk;
|
||||
}
|
||||
);
|
||||
|
||||
$this->assertIsResource($stream1);
|
||||
@@ -112,7 +118,8 @@ final class CallbackOutputTest extends TestCase
|
||||
public function testStreamPositionTracking(): void
|
||||
{
|
||||
$stream = CallbackStreamWrapper::open(
|
||||
static function (string $chunk): void { /* no-op */ }
|
||||
static function (string $chunk): void { // no-op
|
||||
}
|
||||
);
|
||||
|
||||
$this->assertSame(0, ftell($stream));
|
||||
@@ -129,7 +136,8 @@ final class CallbackOutputTest extends TestCase
|
||||
public function testInvalidModeRejection(): void
|
||||
{
|
||||
$stream = CallbackStreamWrapper::open(
|
||||
static function (string $chunk): void { /* no-op */ }
|
||||
static function (string $chunk): void { // no-op
|
||||
}
|
||||
);
|
||||
|
||||
// Close the stream first
|
||||
@@ -143,7 +151,8 @@ final class CallbackOutputTest extends TestCase
|
||||
public function testStreamStatistics(): void
|
||||
{
|
||||
$stream = CallbackStreamWrapper::open(
|
||||
static function (string $chunk): void { /* no-op */ }
|
||||
static function (string $chunk): void { // no-op
|
||||
}
|
||||
);
|
||||
|
||||
fwrite($stream, 'test data');
|
||||
|
||||
Reference in New Issue
Block a user