Пример #1
0
 /**
  * Test that notEmpty() returns true if a value isn't empty (allows zeros).
  */
 public function testNotEmpty()
 {
     $this->assertTrue(Validate::notEmpty('abc'));
     $this->assertTrue(Validate::notEmpty(123));
     $this->assertTrue(Validate::notEmpty(array('foo', 'bar')));
     $this->assertTrue(Validate::notEmpty(true));
     $this->assertTrue(Validate::notEmpty(0));
     $this->assertTrue(Validate::notEmpty('0'));
     $this->assertFalse(Validate::notEmpty(''));
     $this->assertFalse(Validate::notEmpty(false));
     $this->assertFalse(Validate::notEmpty(null));
 }