diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2a04215b98..ede18c0099 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,7 @@ jobs: env: extensions: curl, mbstring, openssl, pdo, pdo_sqlite SYMFONY_DEPRECATIONS_HELPER: weak + COMPOSER_ROOT_VERSION: 4.1 runs-on: ${{ matrix.os }} @@ -82,6 +83,7 @@ jobs: env: extensions: curl, mbstring, openssl, pdo, pdo_sqlite SYMFONY_DEPRECATIONS_HELPER: weak + COMPOSER_ROOT_VERSION: 4.1 runs-on: ${{ matrix.os }} diff --git a/composer.json b/composer.json index 449c84a5f9..c65680233e 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,6 @@ "squizlabs/php_codesniffer": "~2.0", "vlucas/phpdotenv": "^2.0 | ^3.0 | ^4.0 | ^5.0", "symfony/process": ">=2.7 <6.0", - "codeception/lib-innerbrowser": "^1.0 | 2.0.*@dev", "codeception/module-asserts": "^1.0 | 2.0.*@dev", "codeception/module-cli": "^1.0 | 2.0.*@dev", "codeception/module-db": "^1.0 | 2.0.*@dev", diff --git a/tests/cli/BuildCest.php b/tests/cli/BuildCest.php index 9e29141179..f25cf7d8f4 100644 --- a/tests/cli/BuildCest.php +++ b/tests/cli/BuildCest.php @@ -29,7 +29,11 @@ public function buildsActionsForAClass(CliGuy $I) $I->seeInThisFile('use _generated\CliGuyActions'); $I->seeFileFound('CliGuyActions.php', 'tests/support/_generated'); $I->seeInThisFile('seeFileFound('); - $I->seeInThisFile('public function assertEquals($expected, $actual, $message = "") {'); + if (PHP_VERSION_ID < 70400) { + $I->seeInThisFile('public function assertEquals($expected, $actual, $message = "") {'); + } else { + $I->seeInThisFile('public function assertEquals($expected, $actual, string $message = "") {'); + } } public function usesTypehintsWherePossible(CliGuy $I, Scenario $scenario) diff --git a/tests/coverage/LocalCept.php b/tests/coverage/LocalCept.php index d30d7732d0..8f85bb93db 100644 --- a/tests/coverage/LocalCept.php +++ b/tests/coverage/LocalCept.php @@ -2,11 +2,11 @@ $I = new CoverGuy($scenario); $I->wantTo('run local code coverage for cest and test'); $I->amInPath('tests/data/sandbox'); -$I->executeCommand('run math MathTest --coverage', null, '-d pcov.directory=' . getcwd()); +$I->executeCommand('run math MathTest --coverage', false, '-d pcov.directory=' . getcwd()); $I->seeInShellOutput('Classes: 100.00%'); $I->seeInShellOutput('Methods: 100.00%'); $I->amGoingTo('run local codecoverage in cest'); -$I->executeCommand('run math MathCest --coverage', null, '-d pcov.directory=' . getcwd()); +$I->executeCommand('run math MathCest --coverage', false, '-d pcov.directory=' . getcwd()); $I->seeInShellOutput('Classes: 100.00%'); $I->seeInShellOutput('Methods: 100.00%'); diff --git a/tests/data/snapshots/codeception.yml b/tests/data/snapshots/codeception.yml index 8eba8d25f0..5a365db42f 100644 --- a/tests/data/snapshots/codeception.yml +++ b/tests/data/snapshots/codeception.yml @@ -14,8 +14,8 @@ suites: - Asserts - Db: dsn: sqlite:tests/_data/snapshot_test.db - user: - password: + user: '' + password: '' actor_suffix: Tester extensions: diff --git a/tests/unit/Codeception/Command/BuildTest.php b/tests/unit/Codeception/Command/BuildTest.php index cc66420cfa..a0217ba1c8 100644 --- a/tests/unit/Codeception/Command/BuildTest.php +++ b/tests/unit/Codeception/Command/BuildTest.php @@ -26,9 +26,15 @@ public function testBuild() $this->content = $this->log[0]['content']; // methods from Filesystem module - $this->assertStringContainsString('public function amInPath($path)', $this->content); - $this->assertStringContainsString('public function copyDir($src, $dst)', $this->content); - $this->assertStringContainsString('public function seeInThisFile($text)', $this->content); + if (PHP_VERSION_ID < 70400) { + $this->assertStringContainsString('public function amInPath($path)', $this->content); + $this->assertStringContainsString('public function copyDir($src, $dst)', $this->content); + $this->assertStringContainsString('public function seeInThisFile($text)', $this->content); + } else { + $this->assertStringContainsString('public function amInPath(string $path): void', $this->content); + $this->assertStringContainsString('public function copyDir(string $src, string $dst): void', $this->content); + $this->assertStringContainsString('public function seeInThisFile(string $text): void', $this->content); + } // methods from EmulateHelper $this->assertStringContainsString('public function seeEquals($expected, $actual)', $this->content);