Closed jrfnl closed 3 years ago
Given the following code:
use SebastianBergmann\Exporter\Exporter; include __DIR__ . '/vendor/autoload.php'; $exporter = new Exporter; $dir = opendir( __DIR__ ); echo $exporter->export($dir), PHP_EOL; closedir($dir); echo $exporter->export($dir), PHP_EOL;
... the output would be along the lines of:
resource(11) of type (stream) NULL
... which when used in a PHPUnit error message results is something along the lines of:
Failed asserting that NULL is not of type "boolean"
I'd like to suggest reporting closed resources as resource (closed) instead of NULL.
resource (closed)
NULL
(PR upcoming)
As both PRs have now been merged and the 4.x branch merged to master, I think this issue can be closed ?
master
Given the following code:
... the output would be along the lines of:
... which when used in a PHPUnit error message results is something along the lines of:
I'd like to suggest reporting closed resources as
resource (closed)
instead ofNULL
.