Skip to content

Commit

Permalink
Switched to more reliable stream state detection
Browse files Browse the repository at this point in the history
  • Loading branch information
kamermans committed Aug 13, 2016
1 parent 03abc9d commit a8e2f3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/src/Stream/StreamWriterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ public function testWriteAutoCloseOff()

$writer = new StreamWriter($value_stream, $stream, $buffer_size);

$this->assertTrue(is_resource($stream));
$this->assertSame("stream", get_resource_type($stream));

while ($ret = $writer->write(false));

$this->assertTrue(is_resource($stream));
$this->assertSame("Unknown", get_resource_type($stream));
}


Expand All @@ -89,11 +89,11 @@ public function testWriteAutoCloseOn()

$writer = new StreamWriter($value_stream, $stream, $buffer_size);

$this->assertTrue(is_resource($stream));
$this->assertSame("stream", get_resource_type($stream));

while ($ret = $writer->write(true));

$this->assertFalse(is_resource($stream));
$this->assertSame("Unknown", get_resource_type($stream));
}

}

0 comments on commit a8e2f3d

Please sign in to comment.