1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 08:32:56 +00:00

Resolve references in ComposerSchemaTest

This commit is contained in:
Christophe Coevoet 2017-01-03 11:57:35 +01:00
parent 0b27952dec
commit 1cb0ec7911

View file

@ -95,9 +95,8 @@ class ComposerSchemaTest extends \PHPUnit_Framework_TestCase
private function check($json)
{
$schema = json_decode(file_get_contents(__DIR__ . '/../../../../res/composer-schema.json'));
$validator = new Validator();
$validator->check(json_decode($json), $schema);
$validator->check(json_decode($json), (object) array('$ref' => 'file://' . __DIR__ . '/../../../../res/composer-schema.json'));
if (!$validator->isValid()) {
$errors = $validator->getErrors();