Beispiel #1
0
 /**
  * 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')));
 }