Changeset 318
- Timestamp:
- 03/02/07 00:01:03 (2 years ago)
- Files:
-
- trunk/src/main/php/net/stubbles/ipo/request/stubRequest.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/ipo/request/stubRequestPrefixDecorator.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/ipo/request/stubWebRequest.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/ipo/request/stubAbstractRequestTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/ipo/request/stubRequestPrefixDecoratorTestCase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/ipo/request/stubRequest.php
r151 r318 101 101 102 102 /** 103 * returns the request method 104 * 105 * @return string 106 */ 107 public function getMethod(); 108 109 /** 103 110 * checks whether a request value is valid or nor 104 111 * trunk/src/main/php/net/stubbles/ipo/request/stubRequestPrefixDecorator.php
r299 r318 175 175 176 176 /** 177 * returns the request method 178 * 179 * @return string 180 */ 181 public function getMethod() 182 { 183 return $this->request->getMethod(); 184 } 185 186 /** 177 187 * checks whether a request value is valid or nor 178 188 * trunk/src/main/php/net/stubbles/ipo/request/stubWebRequest.php
r298 r318 33 33 $this->unsecureCookies = $_COOKIE; 34 34 } 35 36 /** 37 * returns the request method 38 * 39 * @return string 40 */ 41 public function getMethod() 42 { 43 return $_SERVER['REQUEST_METHOD']; 44 } 35 45 } 36 46 ?> trunk/src/test/php/net/stubbles/ipo/request/stubAbstractRequestTestCase.php
r298 r318 19 19 $this->unsecureCookies = array('baz' => 'foo'); 20 20 } 21 22 public function getMethod() 23 { 24 return 'test'; 25 } 21 26 22 27 public function setValueError($valueName, stubRequestValueError $error) trunk/src/test/php/net/stubbles/ipo/request/stubRequestPrefixDecoratorTestCase.php
r299 r318 177 177 $this->assertEqual($this->request->getValueErrors(stubRequest::SOURCE_COOKIE), array('test_foo' => array(), 'bar' => array())); 178 178 } 179 180 /** 181 * assure that the cancel methods are called 182 */ 183 public function testCancel() 184 { 185 $this->mockRequest->expectOnce('cancel'); 186 $this->mockRequest->expectOnce('isCancelled'); 187 $this->mockRequest->setReturnValue('isCancelled', true); 188 $this->request->cancel(); 189 $this->assertTrue($this->request->isCancelled()); 190 } 191 192 /** 193 * assure that getMethod() is called 194 */ 195 public function testGetMethod() 196 { 197 $this->mockRequest->expectOnce('getMethod'); 198 $this->mockRequest->setReturnValue('getMethod', 'test'); 199 $this->assertEqual($this->request->getMethod(), 'test'); 200 } 179 201 } 180 202 ?>
