Files
cache/test/AbstractTestCase.php

23 lines
532 B
PHP

<?php
namespace IQParts\CacheTest;
use PHPUnit\Framework\TestCase;
abstract class AbstractTestCase extends TestCase
{
/**
* @return string
*/
public function getTmpDirectory(): string
{
$location = __DIR__ . '/../tmp';
if (!file_exists($location)) {
if (!mkdir($location) && !is_dir($location)) {
throw new \RuntimeException('Could not create directory: ' . $location);
}
chmod($location, 0777);
}
return $location;
}
}