Changeset 1499
- Timestamp:
- 04/05/08 00:56:00 (1 month ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/util/Binford.php
r1230 r1499 54 54 return array('allowedValues' => array(self::POWER, 'Binford', 'Binford ' . self::POWER)); 55 55 } 56 57 /** 58 * switch whether a value is required or not 59 * 60 * @param bool $required 61 */ 62 public function setRequired($required) 63 { 64 // deny 65 } 66 56 67 57 /** 68 58 * execute the filter … … 81 71 } 82 72 83 /**84 * set a default value in case the value to filter is not set85 *86 * @param mixed $defaultValue87 */88 public function setDefaultValue($defaultValue)89 {90 // not supported by this filter91 }92 93 /**94 * returns true if the filter has a default value in case the value to filter is not set95 *96 * @return bool97 */98 public function hasDefaultValue()99 {100 return true;101 }102 73 103 74 /** trunk/src/test/php/net/stubbles/util/BinfordTestCase.php
r1288 r1499 68 68 69 69 /** 70 * post process adds a binford header 71 * 72 * @test 73 */ 74 public function postProcess() 75 { 76 $mockResponse = $this->getMock('stubResponse'); 77 $mockResponse->expects($this->once()) 78 ->method('addHeader') 79 ->with($this->equalTo('X-Binford'), $this->equalTo(Binford::POWER)); 80 $this->binford->postProcess($this->getMock('stubRequest'), $this->getMock('stubSession'), $mockResponse); 81 } 82 83 /** 70 84 * assert that the binford hash code always equals the power of binford 71 85 * … … 90 104 $this->assertFalse($this->binford->equals('Bob Vila')); 91 105 } 106 107 /** 108 * string representation 109 * 110 * @test 111 */ 112 public function stringOf() 113 { 114 $this->assertEquals("net::stubbles::util::Binford {\n POWER(integer): 6100\n}\n", (string) $this->binford); 115 } 92 116 } 93 117 ?>
