/** * Test if a rule matches a page/task. * * @dataProvider hasMatchProvider * @covers empire\framework\authorization\rolebased\RulesTable::hasMatch * * @param array $rulesToAdd the rules to add as array with role, page, task * @param string $role the role to match * @param string $page the page to match * @param string $tasks the task to match * @param boolean $matches whether the */ public function testHasMatch($rulesToAdd, $role, $page, $task, $matches) { foreach ($rulesToAdd as $rules) { $this->instance->addRule($rules[0], $rules[1], $rules[2]); } $this->assertSame($matches, $this->instance->hasMatch($role, $page, $task)); }