public grantsAccess ( ) : boolean | ||
Результат | boolean |
public function grantsAccess()
{
$content = array_filter(file($this->file));
foreach ($content as $line) {
if ($this->hasRequireGranted($line)) {
return true;
}
}
return false;
}
/** * Tests a file that does not grant access. */ public function testDoesNotGrantAccess() { $file = new SplFileInfo($this->getRootDir() . '/system/modules/foobar/private/.htaccess', 'system/modules/foobar/private', 'system/modules/foobar/private/.htaccess'); $htaccess = new HtaccessAnalyzer($file); $this->assertFalse($htaccess->grantsAccess()); }