From 54776766822f5facced09ceb0fe6e277a3a39f3d Mon Sep 17 00:00:00 2001 From: jrfnl Date: Fri, 21 Jan 2022 04:26:09 +0100 Subject: [PATCH] Tests: update version constraints in test fixtures ... to allow for installing a wider range of versions of the `ehime/hello-world` package. Includes locking the version for the `with-lock-file` test to `1.0.3` so there are higher and lower versions to switch to during the tests and switching the "unclean" test to use that fixture as a base. --- .github/workflows/continuous-integration.yml | 4 +++ tests/expect/composer.json | 2 +- tests/expect/composer.lock | 2 +- tests/fixtures/no-lock-file/composer.json | 2 +- tests/fixtures/with-lock-file/composer.json | 2 +- tests/fixtures/with-lock-file/composer.lock | 30 ++++++-------------- 6 files changed, 17 insertions(+), 25 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index a9e32f3..e416b84 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -242,13 +242,17 @@ jobs: - name: "Test: plain install" uses: ./ + with: + working-directory: 'tests/fixtures/with-lock-file' - name: "Test: switch to lowest dependencies" uses: ./ with: + working-directory: 'tests/fixtures/with-lock-file' dependency-versions: 'lowest' - name: "Test: switch to highest dependencies" uses: ./ with: + working-directory: 'tests/fixtures/with-lock-file' dependency-versions: 'highest' diff --git a/tests/expect/composer.json b/tests/expect/composer.json index a98134e..42ccd13 100644 --- a/tests/expect/composer.json +++ b/tests/expect/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "ehime/hello-world": "1.0.5" + "ehime/hello-world": "^1.0.0" }, "config": { "allow-plugins": false diff --git a/tests/expect/composer.lock b/tests/expect/composer.lock index 47151b3..f76f733 100644 --- a/tests/expect/composer.lock +++ b/tests/expect/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e037e746895f35129420cbf41acc8908", + "content-hash": "6da8813786f5c3143608266fa0cf0a17", "packages": [ { "name": "ehime/hello-world", diff --git a/tests/fixtures/no-lock-file/composer.json b/tests/fixtures/no-lock-file/composer.json index 2cec593..6eefeaf 100644 --- a/tests/fixtures/no-lock-file/composer.json +++ b/tests/fixtures/no-lock-file/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "ehime/hello-world": "1.0.5" + "ehime/hello-world": "^1.0.0" }, "config": { "allow-plugins": false diff --git a/tests/fixtures/with-lock-file/composer.json b/tests/fixtures/with-lock-file/composer.json index 8b17281..0dfee7a 100644 --- a/tests/fixtures/with-lock-file/composer.json +++ b/tests/fixtures/with-lock-file/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "ehime/hello-world": "1.0.5" + "ehime/hello-world": "^1.0.0" }, "config": { "allow-plugins": false diff --git a/tests/fixtures/with-lock-file/composer.lock b/tests/fixtures/with-lock-file/composer.lock index f488e4e..e50b7ce 100644 --- a/tests/fixtures/with-lock-file/composer.lock +++ b/tests/fixtures/with-lock-file/composer.lock @@ -4,28 +4,24 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "aa5dffd9f21d5d44ce358b01b329e78b", + "content-hash": "091919c4ac368d87445398fc8c8c2696", "packages": [ { "name": "ehime/hello-world", - "version": "1.0.5", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/ehime/hello-world.git", - "reference": "b1c8cdd2c11272d8c5deec7816e51fa5374217c1" + "reference": "033c81f43e6768e817219ab71c6073e6d5b8b094" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ehime/hello-world/zipball/b1c8cdd2c11272d8c5deec7816e51fa5374217c1", - "reference": "b1c8cdd2c11272d8c5deec7816e51fa5374217c1", + "url": "https://api.github.com/repos/ehime/hello-world/zipball/033c81f43e6768e817219ab71c6073e6d5b8b094", + "reference": "033c81f43e6768e817219ab71c6073e6d5b8b094", "shasum": "" }, "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "mockery/mockery": "0.8.*", - "phpunit/phpunit": "4.3.5" + "php": ">=5.3.0" }, "type": "library", "autoload": { @@ -34,26 +30,18 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], "authors": [ { "name": "Jd Daniel", "email": "dodomeki@gmail.com" } ], - "description": "Sample Composer project", - "keywords": [ - "helloworld", - "sample", - "test" - ], + "description": "My first Composer project", "support": { "issues": "https://github.com/ehime/hello-world/issues", - "source": "https://github.com/ehime/hello-world/tree/1.0.5" + "source": "https://github.com/ehime/hello-world/tree/1.0.3" }, - "time": "2015-07-31T17:53:36+00:00" + "time": "2015-07-31T17:46:00+00:00" } ], "packages-dev": [],