While writing some test for my site, i found something which confuses me
On my model "AnnualProgramm", I have a Function called "canFrontendEdit":
public function canFrontendEdit($member=null){
return Permission::check('ADMIN');
}
And I have a very simple test for this function:
public function testCanFrontendEdit() {
$obj = $this->objFromFixture('AnnualProgramm', '2013');
$this->assertFalse($obj->canFrontendEdit());
}
This test always fail, but if i call the page on wich this function is called, i can clearly see that the call to Permission::check() returns false. Has this something to do with the testing framework? And how can i test this function?