Adding PHPUnit tests

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1208 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2014-02-27 10:00:41 +00:00
parent 96cf1c4010
commit a437f8e62a
4 changed files with 43 additions and 0 deletions

24
Tests/test_outputjson.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
class test_outputjson extends PHPUnit_Framework_TestCase
{
public function testoutputjson1 ()
{
$this->expectOutputString("\"\"");
$output = new outputjson ();
$output->out ("");
}
public function testoutputjson2 ()
{
$this->expectOutputString("\"string\"");
$output = new outputjson ();
$output->out ("string");
}
public function testoutputjson3 ()
{
$this->expectOutputString("[1,2,3]");
$output = new outputjson ();
$output->out (array (1,2,3));
}
}