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:
parent
8727df5f82
commit
bd54e43d37
5 changed files with 58 additions and 57 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue