Example #1
0
 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);
 }
Example #2
0
 public function getOutput()
 {
     return $this->output = $this->output ?: File::generateFilepath('dispatcher', getcwd());
 }
Example #3
0
 public function __construct($loader = '')
 {
     $this->loader = $loader ?: File::generateFilepath('activemongo2', getcwd());
     $this->cache = new Cache\Cache();
 }
Example #4
0
 /**
  *  @expectedException RuntimeException
  */
 public function testFilePathException()
 {
     File::generateFilepath();
 }
Example #5
0
 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;
 }
Example #6
0
 public function __construct($className, $temporary = null)
 {
     $this->className = $className;
     $this->temp = $temporary ? $temporary : File::generateFilepath('validator', $className);
     $this->prod = !(defined('DEVELOPMENT_MODE') && DEVELOPMENT_MODE);
 }