Qual: Add phpunit for dolexplodeintoarray function
This commit is contained in:
parent
ce34c01b9e
commit
df6e580dfb
@ -702,5 +702,21 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals(0,$vat1);
|
$this->assertEquals(0,$vat1);
|
||||||
$this->assertEquals(0,$vat2);
|
$this->assertEquals(0,$vat2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* testDolExplodeIntoArray
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testDolExplodeIntoArray()
|
||||||
|
{
|
||||||
|
$stringtoexplode='AA=B/B.CC=.EE=FF.HH=GG;.';
|
||||||
|
$tmp=dolExplodeIntoArray($stringtoexplode,'.','=');
|
||||||
|
|
||||||
|
print __METHOD__." tmp=".json_encode($tmp)."\n";
|
||||||
|
$this->assertEquals('{"AA":"B\/B","CC":"","EE":"FF","HH":"GG;"}',json_encode($tmp));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user