Skip to content

Commit 3fc43ab

Browse files
committed
Make test-data reproducable, include a bitbucket, gitlab package
1 parent 4b1366a commit 3fc43ab

File tree

6 files changed

+1449
-1068
lines changed

6 files changed

+1449
-1068
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ tags.*
1313
ehthumbs.db
1414
Thumbs.db
1515
/test-project
16+
/test-data/vendor

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
OPTS := ""
1+
OPTS ?= ""
22

33
all: test md no-links only-dev only-prod json json-pretty
44

55
test:
6-
php ./composer-lock-diff --from test-data/composer.lock.from --to test-data/composer.lock.to $(OPTS)
6+
php ./composer-lock-diff --from test-data/composer.from.lock --to test-data/composer.to.lock $(OPTS)
77

88
md:
99
$(MAKE) test OPTS=--md
@@ -22,3 +22,12 @@ json:
2222

2323
json-pretty:
2424
$(MAKE) test OPTS="--json --pretty"
25+
26+
# Regenerate the lock files from the json. This is useful when adding new
27+
# entries to test.
28+
locks:
29+
rm -rf test-data/composer.from.lock test-data/vendor
30+
cd test-data && COMPOSER=composer.from.json composer install -v
31+
rm -rf test-data/composer.to.lock test-data/vendor
32+
cd test-data && COMPOSER=composer.to.json composer install -v
33+
rm -rf test-data/vendor

test-data/composer.from.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"repositories": [
3+
{
4+
"type": "vcs",
5+
"url": "git@gitlab.com:pmjones/fake.git"
6+
}
7+
],
8+
"require": {
9+
"caseysoftware/marvel-helper": "=1.1.2",
10+
"doctrine/dbal": "=2.2.0",
11+
"ircmaxell/random-lib": "=1.1.0",
12+
"ircmaxell/security-lib": "=1.0.0",
13+
"monolog/monolog": "=1.10.0",
14+
"payintegrator/afterpay": "=1.5.0",
15+
"pmjones/fake": "=0.0.1"
16+
},
17+
"require-dev": {
18+
"mockery/mockery": "=0.9.4",
19+
"phpunit/phpunit": "=5.0.0"
20+
}
21+
}

0 commit comments

Comments
 (0)