/** * Construct an object to access a SME Configuration database file * with $user's privileges. * * @param string $database Database name */ public function __construct($database, \Nethgui\Authorization\UserInterface $user) { if (!$database) { throw new \InvalidArgumentException(sprintf("%s: You must provide a valid database name.", get_class($this)), 1322148910); } $this->db = $database; $this->user = $user; $this->log = new \Nethgui\Log\Nullog(); $this->readPermission = \Nethgui\Authorization\LazyAccessControlResponse::createDenyResponse(); $this->writePermission = \Nethgui\Authorization\LazyAccessControlResponse::createDenyResponse(); }
public function testCreateDenyResponse() { $i = \Nethgui\Authorization\LazyAccessControlResponse::createDenyResponse(); $this->assertTrue($i->isDenied()); }