public function testFirst() { global $foo, $counter; $file = File::generateFilepath('class_cache', 'fooClass'); if (is_file($file)) { unlink($file); } $proxy = new Cache('fooClass'); $this->assertEquals($proxy->foobar(1, 2, 3), $proxy->foobar(1, 2, 3)); $this->assertEquals($proxy->foobar(1, 2, 3), $proxy->foobar(1, 2, 3)); $x = $proxy->foobar(1, 2, 3); $this->assertEquals($x[0], $foo); $this->assertEquals($counter, 1); unset($proxy); }
public function getOutput() { return $this->output = $this->output ?: File::generateFilepath('dispatcher', getcwd()); }
public function __construct($loader = '') { $this->loader = $loader ?: File::generateFilepath('activemongo2', getcwd()); $this->cache = new Cache\Cache(); }
/** * @expectedException RuntimeException */ public function testFilePathException() { File::generateFilepath(); }
public function __construct($dir, $temporary = null, $prod = false) { $this->dir = $dir; $this->temp = $temporary ? $temporary : File::generateFilepath('validator', $dir); $this->prod = defined('DEVELOPMENT_MODE') ? DEVELOPMENT_MODE : $prod; }
public function __construct($className, $temporary = null) { $this->className = $className; $this->temp = $temporary ? $temporary : File::generateFilepath('validator', $className); $this->prod = !(defined('DEVELOPMENT_MODE') && DEVELOPMENT_MODE); }