/** * Creates symlinks for the public module subfolders. */ private function symlinkModules() { $filter = function (SplFileInfo $file) { return HtaccessAnalyzer::create($file)->grantsAccess(); }; $this->createSymlinksFromFinder($this->findIn($this->rootDir . '/system/modules')->files()->filter($filter)->name('.htaccess'), 'system/modules'); }
/** * 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()); }