00001 <?php
00008 class utString extends foUnitTestBase
00009 {
00010 public function doTest()
00011 {
00012 $this->_testEmptyString();
00013 }
00014
00015 private function _testEmptyString()
00016 {
00017 $this->setSectionLabel('emptyString, return true test');
00018
00019 $emptyString = "";
00020 eval($this->needTrue('emptyString($emptyString)'));
00021
00022 $nullVar = NULL;
00023 eval($this->needTrue('emptyString($nullVar)'));
00024
00025 $emptyArray = array();
00026 eval($this->needTrue('emptyString($emptyArray)'));
00027
00028 eval($this->needTrue('emptyString($this->declaredButEmptyVar)'));
00029
00030
00031 $this->setSectionLabel('emptyString, return false test');
00032 $falseVar = false;
00033 eval($this->needFalse('emptyString($falseVar)'));
00034
00035 $trueVar = true;
00036 eval($this->needFalse('emptyString($trueVar)'));
00037
00038 $notEmptyString = "kalle";
00039 eval($this->needFalse('emptyString($notEmptyString)'));
00040
00041 $notEmptyArray = array(1, 2, 3);
00042 eval($this->needFalse('emptyString($notEmptyArray)'));
00043
00044 eval($this->needFalse('emptyString($this->declaredButNotEmptyVar)'));
00045 }
00046
00047 private $declaredButEmptyVar;
00048 private $declaredButNotEmptyVar = "not empty";
00049 }
00050 ?>