-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test for default branches from config (#224)
* Add a test for default branches from config * Try to trigger CI
- Loading branch information
Showing
5 changed files
with
138 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extra": { | ||
"violinist": { | ||
"default_branch": "develop" | ||
} | ||
}, | ||
"require": { | ||
"psr/log": "^1.0.0" | ||
} | ||
} |
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,61 @@ | ||
{ | ||
"_readme": [ | ||
"This file locks the dependencies of your project to a known state", | ||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", | ||
"This file is @generated automatically" | ||
], | ||
"content-hash": "12419b18b7f2a646b445f66a758bab4a", | ||
"packages": [ | ||
{ | ||
"name": "psr/log", | ||
"version": "1.0.0", | ||
"source": { | ||
"type": "git", | ||
"url": "https://github.com/php-fig/log.git", | ||
"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" | ||
}, | ||
"dist": { | ||
"type": "zip", | ||
"url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", | ||
"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", | ||
"shasum": "" | ||
}, | ||
"type": "library", | ||
"autoload": { | ||
"psr-0": { | ||
"Psr\\Log\\": "" | ||
} | ||
}, | ||
"notification-url": "https://packagist.org/downloads/", | ||
"license": [ | ||
"MIT" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "PHP-FIG", | ||
"homepage": "http://www.php-fig.org/" | ||
} | ||
], | ||
"description": "Common interface for logging libraries", | ||
"keywords": [ | ||
"log", | ||
"psr", | ||
"psr-3" | ||
], | ||
"support": { | ||
"issues": "https://github.com/php-fig/log/issues", | ||
"source": "https://github.com/php-fig/log/tree/1.0.0" | ||
}, | ||
"time": "2012-12-21T11:40:51+00:00" | ||
} | ||
], | ||
"packages-dev": [], | ||
"aliases": [], | ||
"minimum-stability": "stable", | ||
"stability-flags": [], | ||
"prefer-stable": false, | ||
"prefer-lowest": false, | ||
"platform": [], | ||
"platform-dev": [], | ||
"plugin-api-version": "2.1.0" | ||
} |
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,7 @@ | ||
{ | ||
"extra": { | ||
"violinist": { | ||
"default_branch": "develop" | ||
} | ||
} | ||
} |
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,18 @@ | ||
{ | ||
"_readme": [ | ||
"This file locks the dependencies of your project to a known state", | ||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", | ||
"This file is @generated automatically" | ||
], | ||
"content-hash": "f9f1f63b110b9e511d7f794f53c7816b", | ||
"packages": [], | ||
"packages-dev": [], | ||
"aliases": [], | ||
"minimum-stability": "stable", | ||
"stability-flags": [], | ||
"prefer-stable": false, | ||
"prefer-lowest": false, | ||
"platform": [], | ||
"platform-dev": [], | ||
"plugin-api-version": "2.1.0" | ||
} |
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,42 @@ | ||
<?php | ||
|
||
namespace eiriksm\CosyComposerTest\integration; | ||
|
||
/** | ||
* Test for a default commit message. | ||
*/ | ||
class ConfigBranchOrderTest extends ComposerUpdateIntegrationBase | ||
{ | ||
protected $packageForUpdateOutput = 'psr/log'; | ||
protected $packageVersionForFromUpdateOutput = '1.0.0'; | ||
protected $packageVersionForToUpdateOutput = '1.0.2'; | ||
|
||
public function setUp() | ||
{ | ||
parent::setUp(); | ||
$this->createComposerFileFromFixtures($this->dir, 'composer-master.json'); | ||
} | ||
|
||
public function testUpdateInCorrectBranch() | ||
{ | ||
$this->runtestExpectedOutput(); | ||
// Since we don't place the updated composer.lock file, we fully expect the package to not be updated. | ||
// This might also of course be the case for the actual bug we are testing here, but since we already know that | ||
// the lock file in master contains no packages, then this demonstrates that this bug prevents the config branch | ||
// files from being read. Totally. | ||
$this->assertOutputContainsMessage('psr/log was not updated running composer update', $this->cosy); | ||
} | ||
|
||
protected function handleExecutorReturnCallback($cmd, &$return) | ||
{ | ||
if ($cmd === 'git checkout develop') { | ||
$this->createComposerFileFromFixtures($this->dir, 'composer-develop.json'); | ||
$this->placeComposerLockContentsFromFixture('composer-develop.lock', $this->dir); | ||
} | ||
} | ||
|
||
protected function placeInitialComposerLock() | ||
{ | ||
$this->placeComposerLockContentsFromFixture('composer-master.lock', $this->dir); | ||
} | ||
} |