From 1cb0ec79115f48c30305ec165665ce41701493e5 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Tue, 3 Jan 2017 11:57:35 +0100 Subject: [PATCH] Resolve references in ComposerSchemaTest --- tests/Composer/Test/Json/ComposerSchemaTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/Composer/Test/Json/ComposerSchemaTest.php b/tests/Composer/Test/Json/ComposerSchemaTest.php index 0bbfccc72..5ab623d02 100644 --- a/tests/Composer/Test/Json/ComposerSchemaTest.php +++ b/tests/Composer/Test/Json/ComposerSchemaTest.php @@ -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();