Exemplo n.º 1
0
 /**
  * Return a BackendSystem instance
  *
  * Let plugins propose their own backend. If none provided, use the default one.
  *
  * @return BackendSystem
  */
 public static function getSystem()
 {
     $backend = null;
     $params = array('backend' => &$backend);
     EventManager::instance()->processEvent('backend_factory_get_system', $params);
     if ($backend === null) {
         $backend = BackendSystem::instance();
     }
     return $backend;
 }
Exemplo n.º 2
0
 public function setUp()
 {
     parent::setUp();
     ForgeConfig::store();
     ForgeConfig::set('sys_http_user', 'codendiadm');
     $this->plugin = stub('Plugin')->getServiceShortname()->returns('docman');
     $this->retriever = mock('Docman_SystemCheckProjectRetriever');
     $logger = mock('BackendLogger');
     $backend = BackendSystem::instance();
     $this->root_dir_path = dirname(__FILE__) . '/_fixtures/';
     $plugin_info = stub('DocmanPluginInfo')->getPropertyValueForName('docman_root')->returns($this->root_dir_path);
     stub($this->plugin)->getPluginInfo()->returns($plugin_info);
     $this->system_check = new Docman_SystemCheck($this->plugin, $this->retriever, $backend, $logger);
 }
Exemplo n.º 3
0
 function testConstructor()
 {
     $backend = BackendSystem::instance();
 }
Exemplo n.º 4
0
 public function proccess_system_check($params)
 {
     $docman_system_check = new Docman_SystemCheck($this, new Docman_SystemCheckProjectRetriever(new Docman_SystemCheckDao()), BackendSystem::instance(), $params['logger']);
     $docman_system_check->process();
 }