예제 #1
0
 /**
  *
  */
 public function testPrep()
 {
     $config = Repoman::load_config(dirname(__FILE__) . '/pkg4/');
     $config['dry_run'] = true;
     self::$modx->setLogLevel(modX::LOG_LEVEL_FATAL);
     self::$modx->setLogTarget('ECHO');
     $Repoman = new Repoman(self::$modx, $config);
     $Repoman->prep_modx(dirname(__FILE__) . '/pkg4/');
     $assets_url = MODX_BASE_URL . preg_replace('#' . MODX_BASE_PATH . '#', '', dirname(__FILE__) . '/pkg4/') . $config['assets_path'];
     $assets_path = dirname(__FILE__) . '/pkg4/' . $config['assets_path'];
     $core_path = dirname(__FILE__) . '/pkg4/' . $config['core_path'];
     $this->assertTrue(Repoman::$queue['modSystemSetting']['pkg4.assets_url']['value'] == $assets_url, 'Improper value for assets_url');
     $this->assertTrue(Repoman::$queue['modSystemSetting']['pkg4.assets_path']['value'] == $assets_path, 'Improper value for assets_path');
     $this->assertTrue(Repoman::$queue['modSystemSetting']['pkg4.core_path']['value'] == $core_path, 'Improper value for core_path');
 }