Пример #1
0
 /**
  * Creates a ezcBaseMetaData object
  *
  * The sole parameter $installMethod should only be used if you are really
  * sure that you need to use it. It is mostly there to make testing at
  * least slightly possible. Again, do not set it unless instructed.
  *
  * @param string $installMethod
  */
 public function __construct($installMethod = NULL)
 {
     $installMethod = $installMethod !== NULL ? $installMethod : ezcBase::getInstallMethod();
     // figure out which reader to use
     switch ($installMethod) {
         case 'tarball':
             $this->reader = new ezcBaseMetaDataTarballReader();
             break;
         case 'pear':
             $this->reader = new ezcBaseMetaDataPearReader();
             break;
         default:
             throw new ezcBaseMetaDataReaderException("Unknown install method '{$installMethod}'.");
             break;
     }
 }
Пример #2
0
 public function testGetInstallMethod()
 {
     self::assertEquals('devel', ezcBase::getInstallMethod());
 }