[HttpFoundation] added some unit tests (refs #4510)

This commit is contained in:
Fabien Potencier 2012-06-08 16:22:49 +02:00
parent ab5abf6d6b
commit b84b46ba1a
1 changed files with 7 additions and 0 deletions

View File

@ -104,4 +104,11 @@ class JsonResponseTest extends \PHPUnit_Framework_TestCase
$this->setExpectedException('InvalidArgumentException');
$response->setCallback('+invalid');
}
public function testJsonEncodeFlags()
{
$response = new JsonResponse('<>\'&"');
$this->assertEquals('"\u003C\u003E\u0027\u0026\u0022"', $response->getContent());
}
}