From 07f9dc9122c968c67298e74ded97c42dfea603a9 Mon Sep 17 00:00:00 2001 From: Enea Date: Tue, 6 Oct 2020 18:38:15 +0200 Subject: [PATCH] Updated .travis.yml --- .travis.yml | 3 +-- infection.json | 3 ++- tests/unit/functions/FactoryInjectorTest.php | 14 ++++++++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7626fdb6..e769d17d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -118,8 +118,7 @@ before_script: script: - find ./config/ ./functions/ ./src/ ./templates/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l - - composer cs -# - vendor/bin/phpcs --ignore=./tests/_support/* ./src/ ./tests/ + - vendor/bin/phpcs --ignore=./tests/_support/* ./config/ ./functions/ ./src/ ./templates/ ./tests/ - vendor/bin/phpstan analyze # - vendor/bin/psalm - codecept run wpunit && codecept run unit --coverage-text diff --git a/infection.json b/infection.json index 5ba39cd4..e8a125e6 100644 --- a/infection.json +++ b/infection.json @@ -1,7 +1,8 @@ { "source": { "directories": [ - "src" + "src", + "functions" ] }, "logs": { diff --git a/tests/unit/functions/FactoryInjectorTest.php b/tests/unit/functions/FactoryInjectorTest.php index ffd586ed..19a8a6a6 100644 --- a/tests/unit/functions/FactoryInjectorTest.php +++ b/tests/unit/functions/FactoryInjectorTest.php @@ -52,8 +52,6 @@ private function resetFilterCountCallState() { protected function _before() { setUp(); - replace('\ItalyStrap\Core\is_debug', $this->is_debug ); - $this->resetFilterCountCallState(); // phpcs:ignore @@ -79,6 +77,9 @@ protected function _after() { * @test */ public function instanceOkWithFilterFalse() { + $this->is_debug = false; + replace('\ItalyStrap\Core\is_debug', $this->is_debug ); + $this->injector = false; $injector = injector(); @@ -94,6 +95,9 @@ public function instanceOkWithFilterFalse() { * @test */ public function instanceOkWithFilterReturnPrevInstanceOfAuryn() { + $this->is_debug = false; + replace('\ItalyStrap\Core\is_debug', $this->is_debug ); + $this->injector = new AurynInjector(); $injector = injector(); @@ -109,6 +113,9 @@ public function instanceOkWithFilterReturnPrevInstanceOfAuryn() { * @test */ public function instanceOkWithFilterReturnPrevInstanceOfEmpress() { + $this->is_debug = false; + replace('\ItalyStrap\Core\is_debug', $this->is_debug ); + $this->injector = new EmpressInjector(); $injector = injector(); @@ -124,6 +131,9 @@ public function instanceOkWithFilterReturnPrevInstanceOfEmpress() { * @test */ public function assertReturnSameInstance() { + $this->is_debug = false; + replace('\ItalyStrap\Core\is_debug', $this->is_debug ); + $injector = injector(); $another_injector = injector();