-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for disabling the dependency patches resolver + fix a bug fo…
…r disabling other kinds of capabilities
- Loading branch information
Showing
6 changed files
with
63 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/_data/fixtures/disable-dependency-patches/composer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "cweagans/composer-patches-test-project", | ||
"description": "Project for use in cweagans/composer-patches acceptance tests.", | ||
"type": "project", | ||
"license": "BSD-3-Clause", | ||
"repositories": [ | ||
{ | ||
"type": "path", | ||
"url": "../../../../" | ||
}, | ||
{ | ||
"type": "path", | ||
"url": "../../dep-test-package" | ||
} | ||
], | ||
"require": { | ||
"cweagans/composer-patches": "*@dev", | ||
"cweagans/composer-patches-testrepo": "~1.0", | ||
"cweagans/dep-test-package": "*@dev" | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"cweagans/composer-patches": true | ||
} | ||
}, | ||
"extra": { | ||
"composer-patches": { | ||
"disable-resolvers": [ | ||
"\\cweagans\\Composer\\Resolver\\Dependencies" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
/** | ||
* @var \Codeception\Scenario $scenario | ||
*/ | ||
|
||
use cweagans\Composer\Tests\AcceptanceTester; | ||
|
||
$I = new AcceptanceTester($scenario); | ||
$I->wantTo('disable resolving patches from dependencies (and test disabling resolvers in general)'); | ||
$I->amInPath(codecept_data_dir('fixtures/disable-dependency-patches')); | ||
$I->runComposerCommand('install', ['-vvv']); | ||
$I->dontSeeInComposerOutput('Resolving patches from dependencies'); | ||
$I->dontSeeInComposerOutput('Patching cweagans/commposer-patches-testrepo'); | ||
$I->dontSeeFileFound('OneMoreTest.php', 'vendor/cweagans/composer-patches-testrepo/src'); | ||
$I->openFile('patches.lock.json'); | ||
$I->seeInThisFile('6142bfcb78f54dfbf5247ae5e463f25bdb8fff1890806e2e45aa81a59c211653'); |