From a5dfaafa02b8ac7b29266d65e127ac3c95f68c39 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 29 Apr 2015 23:45:30 +0100 Subject: [PATCH] Add a fixture for the schema validation --- .../Composer/Test/Json/Fixtures/composer.json | 59 +++++++++++++++++++ tests/Composer/Test/Json/JsonFileTest.php | 2 +- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 tests/Composer/Test/Json/Fixtures/composer.json diff --git a/tests/Composer/Test/Json/Fixtures/composer.json b/tests/Composer/Test/Json/Fixtures/composer.json new file mode 100644 index 000000000..d1ba2dc17 --- /dev/null +++ b/tests/Composer/Test/Json/Fixtures/composer.json @@ -0,0 +1,59 @@ +{ + "name": "composer/schema-test", + "description": "Dummy file to test the schema verification", + "keywords": ["package", "dependency", "autoload"], + "homepage": "http://getcomposer.org/", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/composer/issues" + }, + "require": { + "php": ">=5.3.2", + "justinrainbow/json-schema": "~1.4", + "seld/jsonlint": "~1.0", + "symfony/console": "~2.5", + "symfony/finder": "~2.2", + "symfony/process": "~2.1" + }, + "require-dev": { + "phpunit/phpunit": "~4.5" + }, + "config": { + "platform": { + "php": "5.3.3" + } + }, + "suggest": { + "ext-zip": "Enabling the zip extension allows you to unzip archives, and allows gzip compression of all internet traffic", + "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages" + }, + "autoload": { + "psr-0": { "Composer": "src/" } + }, + "autoload-dev": { + "psr-0": { "Composer\\Test": "tests/" } + }, + "bin": ["bin/composer"], + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "scripts": { + "test": "phpunit" + } +} diff --git a/tests/Composer/Test/Json/JsonFileTest.php b/tests/Composer/Test/Json/JsonFileTest.php index 9036a23e8..5d896f026 100644 --- a/tests/Composer/Test/Json/JsonFileTest.php +++ b/tests/Composer/Test/Json/JsonFileTest.php @@ -87,7 +87,7 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase public function testSchemaValidation() { - $json = new JsonFile(__DIR__.'/../../../../composer.json'); + $json = new JsonFile(__DIR__.'/fixtures/composer.json'); $this->assertTrue($json->validateSchema()); }