Add PHPUnit tests
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1501 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
32
Tests/outputjsonTest.php
Normal file
32
Tests/outputjsonTest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/** DomFramework - Tests
|
||||
@package domframework
|
||||
@author Dominique Fournier <dominique@fournier38.fr> */
|
||||
|
||||
/** Test the outputjson.php file */
|
||||
class test_outputjson extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/** Entry null */
|
||||
public function testoutputjson1 ()
|
||||
{
|
||||
$this->expectOutputString("\"\"");
|
||||
$output = new outputjson ();
|
||||
$output->out ("");
|
||||
}
|
||||
|
||||
/** Entry string */
|
||||
public function testoutputjson2 ()
|
||||
{
|
||||
$this->expectOutputString("\"string\"");
|
||||
$output = new outputjson ();
|
||||
$output->out ("string");
|
||||
}
|
||||
|
||||
/** Entry array */
|
||||
public function testoutputjson3 ()
|
||||
{
|
||||
$this->expectOutputString("[1,2,3]");
|
||||
$output = new outputjson ();
|
||||
$output->out (array (1,2,3));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user