class JsonResponseTest extends TestCase
{
+ protected function setUp()
+ {
+ parent::setUp();
+
+ if (!\defined('HHVM_VERSION')) {
+ $this->iniSet('serialize_precision', 14);
+ }
+ }
+
public function testConstructorEmptyCreatesJsonObject()
{
$response = new JsonResponse();
*/
public function testSetContentJsonSerializeError()
{
+ if (!interface_exists('JsonSerializable', false)) {
+ $this->markTestSkipped('JsonSerializable is required.');
+ }
+
$serializable = new JsonSerializableObject();
JsonResponse::create($serializable);
}
}
-if (interface_exists('JsonSerializable')) {
+if (interface_exists('JsonSerializable', false)) {
class JsonSerializableObject implements \JsonSerializable
{
public function jsonSerialize()