コード例 #1
0
ファイル: ValidateTest.php プロジェクト: titon/utility-old
 /**
  * Test that inList() returns true if the value is in the whitelist.
  */
 public function testInList()
 {
     $this->assertTrue(Validate::inList(1, array(1, '1', 'c')));
     $this->assertTrue(Validate::inList('foo', array('foo', 'BAR', 'wtf')));
     $this->assertFalse(Validate::inList('b', array(1, '1', 'c')));
     $this->assertFalse(Validate::inList('test', array('foo', 'BAR', 'wtf')));
 }