norwichtech / file-wrapper
A simple file system function wrapper that can be easily mocked or stubbed for testing
This package's canonical repository appears to be gone and the package has been frozen as a result.
2.2.0
2017-09-27 10:31 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: 4.0.*
README
A simple file system function wrapper that can be easily mocked or stubbed for testing
To include simply use
$fileWrapper = new NorwichTech/FileWrapper/FileWrapper;
Then replace normal PHP file functions like file_exists($file) with $fileWrapper->fileExists($file) which can be substituted out in testing to simulate different outcomes.