havramar / phpunit-tmp-dir
Wrapper around VFS for easier creation temporary directory
dev-master
2015-01-14 23:37 UTC
Requires
- mikey179/vfsstream: v1.2.0
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2020-01-06 03:41:48 UTC
README
Wrapper around vfsStream for easier creation temporary directories in PhpUnit tests.
Why
Needed extremely simple way of creating temporary folder, whose content is deleted when tests are finished.
How to run
- Get composer.
composer require havramar/phpunit-tmp-dir:dev-master
- Create example file:
<?php require_once 'vendor/autoload.php'; $path = \PhpunitTempDir\Helper::createTempDir(); // do whatever you want inside $path (mkdir, touch etc), // when script exits, everything is gone as all is happening in memory