PHP Classes

File: tests/JSONTest.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   iaso PHP JSON Parser Library   tests/JSONTest.php   Download  
File: tests/JSONTest.php
Role: Class source
Content type: text/plain
Description: Class source
Class: iaso PHP JSON Parser Library
Parse JSON strings immune to hash-DoS attacks
Author: By
Last change:
Date: 1 year ago
Size: 536 bytes
 

Contents

Class file image Download
<?php
declare(strict_types=1);

use
PHPUnit\Framework\TestCase;
use
ParagonIE\Iaso\JSON;

/**
 * Class ParserTest
 */
class JSONTest extends TestCase
{
   
/**
     * @covers \ParagonIE\Iaso\JSON::parse()
     */
   
public function testJSONBasic()
    {
       
$this->assertSame(null, JSON::parse('null'), 'null');
       
$this->assertSame(true, JSON::parse('true'), 'bool (true)');
       
$this->assertSame(false, JSON::parse('false'), 'bool (false)');
       
$this->assertSame('apple', JSON::parse('"apple"'), 'string');
    }
}