I have function that take a csv file and generate file content in array. I need to write a phpunit tests. Goal is represend correctness of behavior when input is not present or unreadable (whether because the file is malformed or due to the lack of sufficient access rights).
I writed some code but i think it is to much simple.
public function testFileAcessForOther()
{
$fileName = __DIR__.'/../data.csv';
$permission = fileperms($fileName);
$this->assertEquals(33204, $permission);
}
I have googled but didn't find much info about this.
Maybe you can help with some another test case?