Google\Cloud\Tests\JsonFileTest::testToc PHP Method

testToc() public method

public testToc ( )
    public function testToc()
    {
        $file = file_get_contents(__DIR__ . '/../../docs/toc.json');
        $json = json_decode($file);
        $this->assertEquals(JSON_ERROR_NONE, json_last_error());
        $deref = new Dereferencer();
        $schema = $deref->dereference(json_decode(file_get_contents(sprintf(self::SCHEMA_PATH, __DIR__, 'toc.json.schema'))));
        $validator = new Validator($json, $schema);
        $this->assertFalse($validator->fails());
    }