Files
DomFramework/Tests/OutputjsonTest.php
2022-11-25 21:21:30 +01:00

40 lines
852 B
PHP

<?php
/** DomFramework - Tests
* @package domframework
* @author Dominique Fournier <dominique@fournier38.fr>
* @license BSD
*/
namespace Domframework\Tests;
use Domframework\Outputjson;
/** Test the Outputjson.php file */
class OutputjsonTest 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));
}
}