getFiles() public static méthode

public static getFiles ( $path )
 public function testIfRetrievingTheFilesWorks()
 {
     $config = \Mockery::mock('eXistenZNL\\PermCheck\\Config\\Config');
     $filesystem = new Filesystem($config, dirname(__FILE__));
     $files = array(__FILE__);
     $result = array();
     foreach ($filesystem->getFiles() as $file) {
         $result[] = $file->getPathname();
     }
     $this->assertEquals($files, $result);
 }
 public function testIfRetrievingTheFilesWorks()
 {
     /** @var Config|MockInterface $config */
     $config = \Mockery::mock(new Config());
     $filesystem = new Filesystem($config, __DIR__);
     $files = array(__FILE__);
     $result = array();
     foreach ($filesystem->getFiles() as $file) {
         $result[] = $file->getPathname();
     }
     $this->assertEquals($files, $result);
 }
Exemple #3
0
function get_migrations()
{
    $migrations = Filesystem::getFiles('db/migrations');
    natsort($migrations);
    return $migrations;
}
Exemple #4
0
 private function setBlocks()
 {
     $sBlockExt = $this->_oGlobalConfig->get('crispus', 'block_extension');
     // Get all block files
     $oFilesystem = new Filesystem();
     $this->aBlocks = $oFilesystem->getFiles($this->sPath, $sBlockExt);
 }