assertFalse(isset($var)); } public function testNotSet() { $this->assertFalse(PMA_isValid($var)); } public function testEmptyString() { $var = ''; $this->assertFalse(PMA_isValid($var)); } public function testNotEmptyString() { $var = '0'; $this->assertTrue(PMA_isValid($var)); } public function testZero() { $var = 0; $this->assertTrue(PMA_isValid($var)); } public function testNullFail() { $var = null; $this->assertFalse(PMA_isValid($var)); } public function testNotSetArray() { $this->assertFalse(PMA_isValid($array['x'])); } public function testScalarString() { $var = 'string'; $this->assertTrue(PMA_isValid($var, 'scalar')); } public function testScalarInt() { $var = 1; $this->assertTrue(PMA_isValid($var, 'scalar')); } public function testScalarFloat() { $var = 1.1; $this->assertTrue(PMA_isValid($var, 'scalar')); } public function testScalarBool() { $var = true; $this->assertTrue(PMA_isValid($var, 'scalar')); } public function testNotScalarArray() { $var = array('test'); $this->assertFalse(PMA_isValid($var), 'scalar'); } public function testNotScalarNull() { $var = null; $this->assertFalse(PMA_isValid($var), 'scalar'); } public function testNumericInt() { $var = 1; $this->assertTrue(PMA_isValid($var), 'numeric'); } public function testNumericFloat() { $var = 1.1; $this->assertTrue(PMA_isValid($var), 'numeric'); } public function testNumericZero() { $var = 0; $this->assertTrue(PMA_isValid($var), 'numeric'); } public function testNumericString() { $var = '+0.1'; $this->assertTrue(PMA_isValid($var), 'numeric'); } } ?>