Skip to content

Commit

Permalink
Fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Oct 11, 2018
1 parent cd0787c commit 46796bd
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 132 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
build:
environment:
variables:
COMPOSER_ROOT_VERSION: '0.9.99'
COMPOSER_ROOT_VERSION: '0.10.99'

tests:
override:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ matrix:
before_install:
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv config-rm xdebug.ini || true
- export COMPOSER_ROOT_VERSION=0.9.99
- export COMPOSER_ROOT_VERSION=0.10.99
- |
if [ 'false' == "$TRAVIS_PULL_REQUEST" ]; then
cp box.json.dist box.json
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ PHPSCOPER=bin/php-scoper.phar
.PHONY: e2e_004
e2e_004: ## Run end-to-end tests for the fixture set 004 — Source code case
e2e_004: bin/php-scoper.phar
$(PHPBIN) $(BOX) compile --working-dir fixtures/set004
$(PHPBIN) $(BOX) compile --no-parallel --working-dir fixtures/set004

php build/set004/bin/greet.phar > build/set004/output
diff fixtures/set004/expected-output build/set004/output

.PHONY: e2e_005
e2e_005: ## Run end-to-end tests for the fixture set 005 — Third-party code case
e2e_005: bin/php-scoper.phar fixtures/set005/vendor
$(PHPBIN) $(BOX) compile --working-dir fixtures/set005
$(PHPBIN) $(BOX) compile --no-parallel --working-dir fixtures/set005

php build/set005/bin/greet.phar > build/set005/output
diff fixtures/set005/expected-output build/set005/output

.PHONY: e2e_011
e2e_011: ## Run end-to-end tests for the fixture set 011 — Whitelist case
e2e_011: bin/php-scoper.phar fixtures/set011/vendor
$(PHPBIN) $(BOX) compile --working-dir fixtures/set011
$(PHPBIN) $(BOX) compile --no-parallel --working-dir fixtures/set011
cp -R fixtures/set011/tests/ build/set011/tests/

php build/set011/bin/greet.phar > build/set011/output
Expand All @@ -88,15 +88,15 @@ e2e_013: bin/php-scoper.phar
.PHONY: e2e_014
e2e_014: ## Run end-to-end tests for the fixture set 014 — Source code case with PSR-0
e2e_014: bin/php-scoper.phar
$(PHPBIN) $(BOX) compile --working-dir fixtures/set014
$(PHPBIN) $(BOX) compile --no-parallel --working-dir fixtures/set014

php build/set014/bin/greet.phar > build/set014/output
diff fixtures/set014/expected-output build/set014/output

.PHONY: e2e_015
e2e_015: ## Run end-to-end tests for the fixture set 015 — Third-party code case with PSR-0
e2e_015: bin/php-scoper.phar fixtures/set015/vendor
$(PHPBIN) $(BOX) compile --working-dir fixtures/set015
$(PHPBIN) $(BOX) compile --no-parallel --working-dir fixtures/set015

php build/set015/bin/greet.phar > build/set015/output
diff fixtures/set015/expected-output build/set015/output
Expand Down Expand Up @@ -203,7 +203,7 @@ e2e_021: bin/php-scoper.phar fixtures/set021-composer/vendor
.PHONY: e2e_022
e2e_022: ## Run end-to-end tests for the fixture set 022 — Whitelist the project code with namespace whitelisting
e2e_022: bin/php-scoper.phar fixtures/set022/vendor
$(PHPBIN) $(BOX) compile --working-dir fixtures/set022
$(PHPBIN) $(BOX) compile --no-parallel --working-dir fixtures/set022
cp -R fixtures/set022/tests/ build/set022/tests/

php build/set022/bin/greet.phar > build/set022/output
Expand Down Expand Up @@ -294,17 +294,17 @@ tb: bin/php-scoper.phar vendor
#---------------------------------------------------------------------------

vendor: composer.lock
export COMPOSER_ROOT_VERSION='0.9.99'; composer install
export COMPOSER_ROOT_VERSION='0.10.99'; composer install
unset "COMPOSER_ROOT_VERSION"
touch $@

vendor/bamarni: composer.lock
export COMPOSER_ROOT_VERSION='0.9.99'; composer install
export COMPOSER_ROOT_VERSION='0.10.99'; composer install
unset "COMPOSER_ROOT_VERSION"
touch $@

bin/phpunit: composer.lock
export COMPOSER_ROOT_VERSION='0.9.99'; composer install
export COMPOSER_ROOT_VERSION='0.10.99'; composer install
unset "COMPOSER_ROOT_VERSION"
touch $@

Expand All @@ -316,7 +316,7 @@ fixtures/set005/vendor: fixtures/set005/composer.lock
composer --working-dir=fixtures/set005 install
touch $@

fixtures/set011/vendor: fixtures/set011/vendor
fixtures/set011/vendor:
composer --working-dir=fixtures/set011 dump-autoload
touch $@

Expand Down
2 changes: 0 additions & 2 deletions box.json.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"chmod": "0755",

"algorithm": "OPENSSL",
"key": ".travis/php-scoper-private.pem",

Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
}
],

"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.1",
"nikic/php-parser": "^4.0",
Expand All @@ -28,7 +30,7 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.1",
"humbug/box": "^3.0@rc",
"humbug/box": "^3.1",
"phpunit/phpunit": "^7.0"
},
"replace": {
Expand Down
Loading

0 comments on commit 46796bd

Please sign in to comment.