Ejemplo n.º 1
0
 /**
  * Tests deleting a rule (deleting an empty role).
  *
  * @covers empire\framework\authorization\rolebased\RulesTable::deleteRule
  */
 public function testDeleteRuleEmptyRole()
 {
     $this->instance->addRule('editor', '*', '*');
     $this->instance->addRule('*', 'blog', array('write', 'read'));
     $this->instance->deleteRule('*', 'blog');
     $expected = array('editor' => array('*' => '*'));
     $this->assertEquals($expected, $this->instance->getTable());
 }
Ejemplo n.º 2
0
 public function storeTable(RulesTable $table)
 {
     $this->storeAll($table->getTable());
 }