/** * {@inheritDoc} * @see \Ignaszak\Registry\IRegistry::remove($name) */ public function remove(string $name) : IRegistry { $tmpFile = Conf::getTmpPath() . "/IgnaszakRegistry_{$name}.tmp"; if (file_exists($tmpFile)) { unlink($tmpFile); } return parent::remove($name); }
/** * @expectedException \Ignaszak\Registry\RegistryException */ public function testCantSave() { $dir = MockTest::mockDir('tmpPath'); chmod($dir, 00); Conf::setTmpPath($dir); $stub = $this->getMock('AnyClass'); $this->fileRegistry->set('anyName', $stub); }
/** * Configures Registry tmp path * @link https://github.com/ignaszak/php-registry */ public function loadRegistry() { RegistryConf::setTmpPath($this->dir($this->conf['conf']['tmp']['registry'] ?? '')); }
public function __destruct() { setcookie('IgnaszakRegistry', serialize($this->registryArray), time() + Conf::getCookieLife(), Conf::getCookiePath()); }
public function testCookiePath() { Conf::setCookiePath('/'); $this->assertEquals('/', Conf::getCookiePath()); }