I have set up a vfsstream block device and I'm trying to call file_get_contents()
on it.
However the call to vfsStreamWrapper::stream_open
fails and therefore the stream cannot be opened.
Here is my code:
$this->root = vfsStream::setup('root');
$this->root->addChild(new vfsStreamBlock('test_block_device'));
$this->root->addChild(new vfsStreamFile('not_block_device'));
echo file_get_contents('vfs://root/test_block_device/size');
Here is the error:
file_get_contents(vfs://root/test_block_device/size): failed to open stream: "org\bovigo\vfs\vfsStreamWrapper::stream_open" call failed
Here is the closest issue I've found on this
However his was an issue with phpunit's teardown and mine happens mid-test.