Registry / testing / mikey179-vfsstream

mikey179-vfsstream

JSON →
library1.6.12phppackagistunverified

Virtual file system to mock the real file system in unit tests.

composer require mikey179/vfsstream
INSTALL
IMPORT
SIG · MIKEY179-VFSSTREAM
M
mikey179-vfsstream
testingphpv1.6.12
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

vfsStream
use org\bovigo\vfs\vfsStream;

Creates a virtual file system with a file for testing.

use org\bovigo\vfs\vfsStream; $root = vfsStream::setup('testDir'); $file = vfsStream::newFile('test.txt')->at($root); file_put_contents($file->url(), 'content');
Debug
Known issues
gotchavfsStream does not support all filesystem functions (e.g., realpath)
fix
Use vfsStream::url() to get virtual paths; avoid realpath.
affects: *
Upgrade
Version history
1.6.12latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
mikey179-vfsstream — pip install mikey179-vfsstream · libregistry