コード例 #1
0
ファイル: MockRequestTest.php プロジェクト: horde/horde
 public function testGetHeaderNames()
 {
     $r = new Horde_Controller_Request_Mock(array('SERVER' => array('HTTP_TEST' => 'test')));
     $this->assertEquals(array('test'), $r->getHeaderNames());
 }
コード例 #2
0
ファイル: RedirectTest.php プロジェクト: raz0rsdge/horde
 private function _provider($path)
 {
     $request = new Horde_Controller_Request_Mock();
     $request->setPath($path);
     return new Horde_Kolab_FreeBusy_Provider_Remote_Redirect($this->getRemoteOwner(), $request);
 }
コード例 #3
0
ファイル: TestCase.php プロジェクト: raz0rsdge/horde
 protected function getTestMatchDict($type = 'fetch')
 {
     switch ($type) {
         case 'empty':
             $route = 'trigger/*(folder).pfb';
             $match = array('controller' => 'freebusy', 'action' => 'trigger');
             $path = '/trigger/.pfb';
             break;
         case 'invalid':
             $route = 'trigger/*(folder).pfb';
             $match = array('controller' => 'freebusy', 'action' => 'trigger');
             $path = '/trigger/INVALID.pfb';
             break;
         case 'trigger':
             $route = 'trigger/*(folder).pfb';
             $match = array('controller' => 'freebusy', 'action' => 'trigger');
             $path = '/trigger/owner@example.org/Kalender.pfb';
             break;
         case 'fetch':
         default:
             $route = ':(owner).:(type)';
             $match = array('controller' => 'freebusy', 'action' => 'fetch', 'requirements' => array('type' => '(i|x|v)fb', 'owner' => '[^/]+'));
             $path = '/owner@example.org.xfb';
             break;
     }
     $mapper = new Horde_Routes_Mapper();
     $mapper->connect($route, $match);
     $request = new Horde_Controller_Request_Mock();
     $request->setPath($path);
     return new Horde_Kolab_FreeBusy_Controller_MatchDict($mapper, $request);
 }
コード例 #4
0
ファイル: PassThroughTest.php プロジェクト: jubinpatel/horde
 private function _provider($path, $code = 200)
 {
     $request = new Horde_Controller_Request_Mock();
     $request->setPath($path);
     return new Horde_Kolab_FreeBusy_Provider_Remote_PassThrough($this->getRemoteOwner(), $request, $this->_getUser(), $this->getHttpClient('RESPONSE', $code));
 }