コード例 #1
0
 /**
  * Test the behavior of the finder when the sub directory where states files are stored is not readable.
  */
 public function testListStatePathNotReadable()
 {
     chmod($this->statedClass1Path . DIRECTORY_SEPARATOR . Loader\FinderInterface::STATES_PATH, 00);
     $this->initializeFinder('Class1', $this->statedClass1Path);
     try {
         $this->finder->listStates();
     } catch (Exception\UnReadablePath $e) {
         return;
     } catch (\Exception $e) {
     }
     $this->fail('Error, if the state path is not readable, the Finder must throw an exception `Exception\\UnReadablePath`');
 }