Changeset 1574
- Timestamp:
- 05/22/08 15:03:52 (3 months ago)
- Files:
-
- trunk/src/main/php/net/stubbles/ipo/request/broker/annotations/stubPreselectFilterAnnotation.php (added)
- trunk/src/main/php/net/stubbles/ipo/request/validator/stubPreSelectValidator.php (modified) (3 diffs)
- trunk/src/test/php/net/stubbles/ipo/IPOTestSuite.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/ipo/request/broker/annotations/stubPreselectFilterAnnotationTestCase.php (added)
- trunk/src/test/php/net/stubbles/ipo/request/validator/stubPreSelectValidatorTestCase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/ipo/request/validator/stubPreSelectValidator.php
r1547 r1574 34 34 35 35 /** 36 * returns list of allowed values 37 * 38 * @return array 39 */ 40 public function getAllowedValues() 41 { 42 return $this->allowedValues; 43 } 44 45 /** 36 46 * validate that the given value is within a list of allowed values 37 47 * … … 44 54 return in_array($value, $this->allowedValues); 45 55 } 56 46 57 foreach ($value as $val) { 47 58 if (!in_array($val, $this->allowedValues)) { … … 49 60 } 50 61 } 62 51 63 return true; 52 64 } trunk/src/test/php/net/stubbles/ipo/IPOTestSuite.php
r1547 r1574 40 40 $suite->addTestFile($dir . '/request/broker/annotations/stubMailFilterAnnotationTestCase.php'); 41 41 $suite->addTestFile($dir . '/request/broker/annotations/stubPasswordFilterAnnotationTestCase.php'); 42 $suite->addTestFile($dir . '/request/broker/annotations/stubPreselectFilterAnnotationTestCase.php'); 42 43 $suite->addTestFile($dir . '/request/broker/annotations/stubStringFilterAnnotationTestCase.php'); 43 44 $suite->addTestFile($dir . '/request/broker/annotations/stubTextFilterAnnotationTestCase.php'); trunk/src/test/php/net/stubbles/ipo/request/validator/stubPreSelectValidatorTestCase.php
r1547 r1574 32 32 33 33 /** 34 * allowed values should be as given in constructor 35 * 36 * @test 37 */ 38 public function allowedValues() 39 { 40 $this->assertEquals(array('foo', 'bar'), $this->preSelectValidator->getAllowedValues()); 41 } 42 43 /** 34 44 * assure that validation works correct 35 45 *
