phpunit.php 623 B

1234567891011121314151617181920
  1. <?php
  2. include __DIR__ . '/vendor/autoload.php';
  3. date_default_timezone_set('UTC');
  4. if ( ! is_dir(__DIR__ . '/tests/files')) {
  5. mkdir(__DIR__ . '/tests/files', 0777, true);
  6. }
  7. $fs = new League\Flysystem\Adapter\Local(__DIR__ . '/tests/files');
  8. foreach (array_reverse($fs->listContents()) as $info) {
  9. if (is_file(__DIR__ . '/tests/files/' . $info['path'])) {
  10. unlink(__DIR__ . '/tests/files/' . $info['path']);
  11. } else {
  12. rmdir(__DIR__ . '/tests/files/' . $info['path']);
  13. }
  14. }
  15. // Constant which show when tests are run on windows
  16. define("IS_WINDOWS", strtolower(substr(PHP_OS, 0, 3)) === 'win');