Permalink
Browse files

Add Infection (#172)

Run mutation testing with scoped Infection
  • Loading branch information...
theofidry committed Feb 27, 2018
1 parent b21fbfe commit 0a2097be33b9fb934c00d7a2dba0a2fcbcbb2f8e
View
@@ -8,7 +8,7 @@ cache:
matrix:
include:
- php: '7.1'
- php: '7.2'
env: COVERAGE='true'
- php: '7.1'
- php: nightly
@@ -18,7 +18,6 @@ matrix:
before_install:
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv config-rm xdebug.ini || true
- |
if [ 'false' == "$TRAVIS_PULL_REQUEST" ]; then
cp box.json.dist box.json
@@ -35,7 +34,7 @@ script:
make tc
make e2e
else
make tu
make tm
fi
deploy:
View
@@ -57,8 +57,12 @@ tc: ## Run PHPUnit tests with test coverage
tc: vendor/bin/phpunit
phpdbg -qrr -d zend.enable_gc=0 $(PHPUNIT) --coverage-html=dist/coverage --coverage-text
tm: ## Run Infection (Mutation Testing)
tm: vendor/bin/phpunit
$(MAKE) e2e_020
e2e: ## Run end-to-end tests
e2e: e2e_004 e2e_005 e2e_011 e2e_013 e2e_014 e2e_015 e2e_016 e2e_017 e2e_018 e2e_019
e2e: e2e_004 e2e_005 e2e_011 e2e_013 e2e_014 e2e_015 e2e_016 e2e_017 e2e_018 e2e_019 e2e_020
e2e_004: ## Run end-to-end tests for the fixture set 004: source code case
e2e_004: bin/php-scoper.phar
@@ -145,6 +149,13 @@ e2e_019: bin/php-scoper.phar fixtures/set019-symfony-console/vendor
php build/set019-symfony-console/main.php > build/set019-symfony-console/output
diff fixtures/set019-symfony-console/expected-output build/set019-symfony-console/output
e2e_020: ## Run end-to-end tests for the fixture set 020: Infection
e2e_020: bin/php-scoper.phar fixtures/set020-infection/vendor
php -d zend.enable_gc=0 $(PHPSCOPER) add-prefix --working-dir=fixtures/set020-infection --output-dir=../../build/set020-infection --force --no-interaction --stop-on-failure
composer --working-dir=build/set020-infection dump-autoload
php build/set020-infection/vendor/infection/infection/bin/infection
tb: ## Run Blackfire profiling
tb: vendor
rm -rf build
@@ -195,6 +206,9 @@ fixtures/set018-nikic-parser/vendor: fixtures/set018-nikic-parser/composer.lock
fixtures/set019-symfony-console/vendor: fixtures/set019-symfony-console/composer.lock
composer --working-dir=fixtures/set019-symfony-console install
fixtures/set020-infection/vendor: fixtures/set020-infection/composer.lock
composer --working-dir=fixtures/set020-infection install
composer.lock: composer.json
@echo composer.lock is not up to date.
@@ -222,6 +236,9 @@ fixtures/set018-nikic-parser/composer.lock: fixtures/set018-nikic-parser/compose
fixtures/set019-symfony-console/composer.lock: fixtures/set019-symfony-console/composer.json
@echo fixtures/set019-symfony-console/composer.lock is not up to date.
fixtures/set020-infection/composer.lock: fixtures/set020-infection/composer.json
@echo fixtures/set020-infection/composer.lock is not up to date.
bin/php-scoper.phar: bin/php-scoper src vendor vendor-bin/box/vendor scoper.inc.php box.json
$(MAKE) build

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1,9 +1,9 @@
array(
0: rser_Node_Stmt_Function(
0: Stmt_Function(
byRef: false
name: test
params: array(
0: rser_Node_Param(
0: Param(
type: null
byRef: false
variadic: false
@@ -13,15 +13,15 @@ array(
)
returnType: null
stmts: array(
0: rser_Node_Expr_FuncCall(
name: rser_Node_Name(
0: Expr_FuncCall(
name: Name(
parts: array(
0: var_dump
)
)
args: array(
0: rser_Node_Arg(
value: rser_Node_Expr_Variable(
0: Arg(
value: Expr_Variable(
name: foo
)
byRef: false
@@ -0,0 +1,6 @@
{
"require": {
"infection/infection": "dev-master",
"nikic/php-parser": "v3.1.4"
}
}
Oops, something went wrong.

0 comments on commit 0a2097b

Please sign in to comment.