'help' => Horde_Kolab_Storage_Translation::t('The user accessing the backend.')
)
),
+ new Horde_Argv_Option(
+ '-p',
+ '--pass',
+ array(
+ 'action' => 'store',
+ 'help' => Horde_Kolab_Storage_Translation::t('The password of the user accessing the backend.')
+ )
+ ),
+ new Horde_Argv_Option(
+ '-H',
+ '--host',
+ array(
+ 'action' => 'store',
+ 'help' => Horde_Kolab_Storage_Translation::t('The host that holds the data.')
+ )
+ ),
);
$usage = Horde_Kolab_Storage_Translation::t(
"[options] MODULE ACTION\nPossible MODULEs and ACTIONs:
$this->runCli()
);
}
+
+ public function testOptionUser()
+ {
+ $_SERVER['argv'] = array(
+ 'kolab-storage'
+ );
+ $this->assertRegExp(
+ '/-u[ ]*USER,[ ]*--user=USER/',
+ $this->runCli()
+ );
+ }
+
+ public function testOptionPass()
+ {
+ $_SERVER['argv'] = array(
+ 'kolab-storage'
+ );
+ $this->assertRegExp(
+ '/-p[ ]*PASS,[ ]*--pass=PASS/',
+ $this->runCli()
+ );
+ }
+
+ public function testOptionHost()
+ {
+ $_SERVER['argv'] = array(
+ 'kolab-storage'
+ );
+ $this->assertRegExp(
+ '/-H[ ]*HOST,[ ]*--host=HOST/',
+ $this->runCli()
+ );
+ }
}