findMagentoRootDir() 공개 메소드

Given a start directory, work upwards and attempt to identify the Magento root directory. Throws an exception if it can't be found.
public findMagentoRootDir ( string $start_directory ) : string
$start_directory string
리턴 string
예제 #1
0
 /**
  * @test
  * @expectedException \Exception
  */
 public function testFindMagentoRootDirNotFound()
 {
     $dir_prefix = __DIR__ . "/MagentoTest";
     $this->assertFileExists("{$dir_prefix}/a/b/app/Mage.php");
     $magento = new Magento("{$dir_prefix}/a/b");
     $this->assertFileNotExists("{$dir_prefix}/a/app/Mage.php");
     $magento->findMagentoRootDir("{$dir_prefix}/a");
 }