Permalink
Browse files

add test which reproduces PHP 7 test failure in smallest possible way

The bug highlighted by this test is the one that prevents removing
the allowed failure on the Travis build for PHP 7. When this is fixed
the PHP 7 support tracked with #120 will finally be possible.

See PHP bug https://bugs.php.net/bug.php?id=71287 for further reference.
  • Loading branch information...
mikey179 committed Jan 5, 2016
1 parent f4aabeb commit 732c6cb0f285bff486b6e363a700b8591a122a96
Showing with 21 additions and 0 deletions.
  1. +1 −0 phpunit.xml.dist
  2. +20 −0 src/test/phpt/foo.phpt
View
@@ -17,6 +17,7 @@
verbose="true">
<testsuites>
<testsuite>
<directory suffix=".phpt">./src/test/phpt</directory>
<directory suffix="TestCase.php">./src/test/php</directory>
</testsuite>
</testsuites>
View
@@ -0,0 +1,20 @@
--TEST--
Reproduce octal output from stream wrapper invocation
--FILE--
<?php
class Stream {
public function stream_open($path, $mode, $options, $opened_path) {
return true;
}
public function stream_write($data) {
return (int) (strlen($data) - 2);
}
}
stream_wrapper_register('test', Stream::class);
file_put_contents('test://file.txt', 'foobarbaz');
?>
--EXPECT--
Warning: file_put_contents(): Only 7 of 9 bytes written, possibly out of free disk space in - on line 14

0 comments on commit 732c6cb

Please sign in to comment.