public function testDelete()
 {
     $env = new \Test\Tool\ModuleTestEnvironment();
     $env->setArguments(array('delete'));
     $env->setRequest(array('delete' => array('address' => '10.0.0.0')));
     $cs = new \Test\Tool\MockState();
     $cs->set(\Test\Tool\DB::getProp('httpd-admin', 'ValidFrom'), '192.168.1.0/255.255.255.0,10.0.0.0/255.128.0.0')->transition(\Test\Tool\DB::setProp('httpd-admin', 'ValidFrom', '192.168.1.0/255.255.255.0'), TRUE)->setFinal();
     $env->setDatabase('configuration', $cs);
     $env->setEvents(array('remoteaccess-update'));
     $this->runModuleTest($this->object, $env);
 }
Esempio n. 2
0
 public function testDisablePassword()
 {
     $env = new \Test\Tool\ModuleTestEnvironment();
     $env->setRequest(array('status' => 'anyNetwork', 'acceptPasswordFromAnyNetwork' => ''));
     $env->setView(array('status' => 'anyNetwork', 'acceptPasswordFromAnyNetwork' => ''));
     $cs = new \Test\Tool\MockState();
     $cs->set(DB::getProp('ftp', 'status'), 'enabled');
     $cs->set(DB::getProp('ftp', 'LoginAccess'), 'public');
     $cs->set(DB::getProp('ftp', 'access'), 'public');
     $cs->transition(DB::setProp('ftp', 'access', 'private'), TRUE)->setFinal();
     $env->setDatabase('configuration', $cs);
     $env->setEvents(array('remoteaccess-update'));
     $this->runModuleTest($this->object, $env);
 }