Esempio n. 1
0
 /**
  * @return AkRequest
  */
 function createRequest($url, $method = 'get')
 {
     $Request = $this->getMock('AkRequest', array('getRequestedUrl', 'getMethod', 'getRelativeUrlRoot'));
     $Request->expects($this->any())->method('getRequestedUrl')->will($this->returnValue($url));
     $Request->expects($this->any())->method('getMethod')->will($this->returnValue($method));
     $Request->expects($this->any())->method('getRelativeUrlRoot')->will($this->returnValue(''));
     AkRequest::$singleton = $Request;
     return $this->Request = $Request;
 }
Esempio n. 2
0
 /**
  * @return AkRequest
  */
 static function getInstance()
 {
     if (!self::$singleton) {
         self::$singleton = new AkRequest();
     }
     return self::$singleton;
 }