-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add e2e test to tests against codeception 5
- Loading branch information
Showing
19 changed files
with
3,659 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
paths: | ||
tests: tests | ||
output: tests/_output | ||
data: tests/_data | ||
support: tests/_support | ||
envs: tests/_envs | ||
actor_suffix: Tester | ||
extensions: | ||
enabled: | ||
- Codeception\Extension\RunFailed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"require-dev": { | ||
"codeception/codeception": "~5.0", | ||
"codeception/module-asserts": "^3.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Codeception_5\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Codeception_5\\Test\\": "tests/" | ||
} | ||
}, | ||
"require": { | ||
"infection/infection": "0.27.4", | ||
"infection/codeception-adapter": "dev-master" | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"infection/extension-installer": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Total: 4 | ||
|
||
Killed: 3 | ||
Errored: 0 | ||
Syntax Errors: 0 | ||
Escaped: 1 | ||
Timed Out: 0 | ||
Skipped: 0 | ||
Not Covered: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/infection/infection/0.27.0/resources/schema.json", | ||
"timeout": 25, | ||
"source": { | ||
"directories": [ | ||
"src" | ||
] | ||
}, | ||
"tmpDir": ".", | ||
"testFramework": "codeception" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
tputx () { | ||
test -x $(which tput) && tput "$@" | ||
} | ||
|
||
run () { | ||
local INFECTION=${1} | ||
local PHPARGS=${2} | ||
|
||
if [ "$DRIVER" = "phpdbg" ] | ||
then | ||
phpdbg $PHPARGS -qrr $INFECTION | ||
else | ||
php $PHPARGS $INFECTION | ||
fi | ||
} | ||
|
||
cd "$(dirname "$0")" | ||
|
||
git_branch=$(echo "${GITHUB_HEAD_REF:-$(git rev-parse --abbrev-ref HEAD)}" | sed 's/\//\\\//g') | ||
|
||
echo "git_branch: ${git_branch}" | ||
|
||
if [ "$git_branch" == "master" ]; then | ||
exit 0; | ||
fi; | ||
|
||
sed -i "s/\"infection\/codeception-adapter\": \"dev-master\"/\"infection\/codeception-adapter\": \"dev-${git_branch}\"/" composer.json | ||
|
||
set -e pipefail | ||
|
||
rm -f composer.lock | ||
composer install | ||
|
||
run "vendor/bin/infection" | ||
|
||
git checkout composer.json | ||
|
||
diff -w expected-output.txt infection.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Codeception_5; | ||
|
||
class SourceClass | ||
{ | ||
public function add(float $a, float $b): float | ||
{ | ||
return $a + $b; | ||
} | ||
} |
Empty file.
Empty file.
26 changes: 26 additions & 0 deletions
26
tests/e2e/Codeception_5/tests/_support/AcceptanceTester.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
|
||
/** | ||
* Inherited Methods | ||
* @method void wantToTest($text) | ||
* @method void wantTo($text) | ||
* @method void execute($callable) | ||
* @method void expectTo($prediction) | ||
* @method void expect($prediction) | ||
* @method void amGoingTo($argumentation) | ||
* @method void am($role) | ||
* @method void lookForwardTo($achieveValue) | ||
* @method void comment($description) | ||
* @method void pause() | ||
* | ||
* @SuppressWarnings(PHPMD) | ||
*/ | ||
class AcceptanceTester extends \Codeception\Actor | ||
{ | ||
use _generated\AcceptanceTesterActions; | ||
|
||
/** | ||
* Define custom actions here | ||
*/ | ||
} |
26 changes: 26 additions & 0 deletions
26
tests/e2e/Codeception_5/tests/_support/FunctionalTester.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
|
||
/** | ||
* Inherited Methods | ||
* @method void wantToTest($text) | ||
* @method void wantTo($text) | ||
* @method void execute($callable) | ||
* @method void expectTo($prediction) | ||
* @method void expect($prediction) | ||
* @method void amGoingTo($argumentation) | ||
* @method void am($role) | ||
* @method void lookForwardTo($achieveValue) | ||
* @method void comment($description) | ||
* @method void pause() | ||
* | ||
* @SuppressWarnings(PHPMD) | ||
*/ | ||
class FunctionalTester extends \Codeception\Actor | ||
{ | ||
use _generated\FunctionalTesterActions; | ||
|
||
/** | ||
* Define custom actions here | ||
*/ | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/e2e/Codeception_5/tests/_support/Helper/Acceptance.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
namespace Helper; | ||
|
||
// here you can define custom actions | ||
// all public methods declared in helper class will be available in $I | ||
|
||
class Acceptance extends \Codeception\Module | ||
{ | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
tests/e2e/Codeception_5/tests/_support/Helper/Functional.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
namespace Helper; | ||
|
||
// here you can define custom actions | ||
// all public methods declared in helper class will be available in $I | ||
|
||
class Functional extends \Codeception\Module | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
namespace Helper; | ||
|
||
// here you can define custom actions | ||
// all public methods declared in helper class will be available in $I | ||
|
||
class Unit extends \Codeception\Module | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
|
||
/** | ||
* Inherited Methods | ||
* @method void wantToTest($text) | ||
* @method void wantTo($text) | ||
* @method void execute($callable) | ||
* @method void expectTo($prediction) | ||
* @method void expect($prediction) | ||
* @method void amGoingTo($argumentation) | ||
* @method void am($role) | ||
* @method void lookForwardTo($achieveValue) | ||
* @method void comment($description) | ||
* @method void pause() | ||
* | ||
* @SuppressWarnings(PHPMD) | ||
*/ | ||
class UnitTester extends \Codeception\Actor | ||
{ | ||
use _generated\UnitTesterActions; | ||
|
||
/** | ||
* Define custom actions here | ||
*/ | ||
} |
Oops, something went wrong.