[ticket/15305] Open file in w+b mode

PHPBB3-15305
This commit is contained in:
Rubén Calvo 2017-08-08 00:14:56 +02:00
parent c28100be1c
commit 9d8e0080b9

View file

@ -115,7 +115,7 @@
public function test_write_stream() public function test_write_stream()
{ {
file_put_contents($this->path . 'file.txt', 'abc'); file_put_contents($this->path . 'file.txt', 'abc');
$stream = fopen($this->path . 'file.txt', 'rb'); $stream = fopen($this->path . 'file.txt', 'w+b');
$this->adapter->write_stream('file2.txt', $stream); $this->adapter->write_stream('file2.txt', $stream);
fclose($stream); fclose($stream);
$this->assertEquals(file_get_contents($this->path . 'file2.txt'), 'abc'); $this->assertEquals(file_get_contents($this->path . 'file2.txt'), 'abc');