File size: 497 Bytes
e4f4821
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

use JsonRPC\Validator\JsonFormatValidator;

require_once __DIR__.'/../../../../vendor/autoload.php';

class JsonFormatValidatorTest extends PHPUnit_Framework_TestCase
{
    public function testJsonParsedCorrectly()
    {
        $this->assertNull(JsonFormatValidator::validate(array('foobar')));
    }

    public function testJsonNotParsedCorrectly()
    {
        $this->expectException('\JsonRPC\Exception\InvalidJsonFormatException');
        JsonFormatValidator::validate('');
    }
}