1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Rework JsonFile API slightly, avoid tokenizing in php if the syntax is valid

This commit is contained in:
Jordi Boggiano 2012-03-05 22:01:47 +01:00
parent 8727df5f82
commit bd54e43d37
5 changed files with 58 additions and 57 deletions

View file

@ -87,13 +87,8 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase
public function testSchemaValidation()
{
$json = file_get_contents(__DIR__.'/../../../../composer.json');
try {
$this->assertNull(JsonFile::validateSchema($json));
} catch (\UnexpectedValueException $e) {
$this->fail('invalid schema');
}
$json = new JsonFile(__DIR__.'/../../../../composer.json');
$this->assertTrue($json->validateSchema());
}
public function testParseErrorDetectMissingCommaMultiline()