diff --git a/codeception.yml b/codeception.yml new file mode 100644 index 000000000..3007d95c7 --- /dev/null +++ b/codeception.yml @@ -0,0 +1,13 @@ +namespace: App\Tests +paths: + tests: tests + output: tests/_output + data: tests/_data + support: tests/_support + envs: tests/_envs +actor_suffix: Tester +extensions: + enabled: + - Codeception\Extension\RunFailed +params: + - .env diff --git a/symfony.lock b/symfony.lock index 23d8ceaee..2261a33ef 100644 --- a/symfony.lock +++ b/symfony.lock @@ -32,12 +32,12 @@ "version": "3.1.0" }, "codeception/codeception": { - "version": "2.3", + "version": "5.0", "recipe": { "repo": "github.com/symfony/recipes-contrib", - "branch": "master", + "branch": "main", "version": "2.3", - "ref": "d2a29c0abee586aff913fd45fae1f59b669f4cbe" + "ref": "89689e24507d8cb2c4a7937ece549db3836b608c" }, "files": [ "codeception.yml", @@ -50,12 +50,12 @@ "tests/_support/Helper/Unit.php", "tests/_support/UnitTester.php", "tests/_support/_generated/.gitignore", - "tests/acceptance/.gitignore", - "tests/functional/.gitignore", - "tests/unit/.gitignore", "tests/acceptance.suite.yml", + "tests/acceptance/.gitignore", "tests/functional.suite.yml", - "tests/unit.suite.yml" + "tests/functional/.gitignore", + "tests/unit.suite.yml", + "tests/unit/.gitignore" ] }, "codeception/lib-asserts": { diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml new file mode 100644 index 000000000..4733290f4 --- /dev/null +++ b/tests/acceptance.suite.yml @@ -0,0 +1,12 @@ +# Codeception Test Suite Configuration +# +# Suite for acceptance tests. +# Perform tests in browser using the WebDriver or PhpBrowser. +# If you need both WebDriver and PHPBrowser tests - create a separate suite. + +actor: AcceptanceTester +modules: + enabled: + - PhpBrowser: + url: http://localhost:8000 + - \App\Tests\Helper\Acceptance diff --git a/tests/functional.suite.yml b/tests/functional.suite.yml new file mode 100644 index 000000000..ccd2a252f --- /dev/null +++ b/tests/functional.suite.yml @@ -0,0 +1,17 @@ +# Codeception Test Suite Configuration +# +# Suite for functional tests +# Emulate web requests and make application process them +# Include one of framework modules (Symfony2, Yii2, Laravel5) to use it +# Remove this suite if you don't use frameworks + +actor: FunctionalTester +modules: + enabled: + - Symfony: + app_path: 'src' + environment: 'test' +# - Doctrine2: +# depends: Symfony +# cleanup: true + - \App\Tests\Helper\Functional diff --git a/tests/unit.suite.yml b/tests/unit.suite.yml new file mode 100644 index 000000000..56d5ea86a --- /dev/null +++ b/tests/unit.suite.yml @@ -0,0 +1,9 @@ +# Codeception Test Suite Configuration +# +# Suite for unit or integration tests. + +actor: UnitTester +modules: + enabled: + - Asserts + - \App\Tests\Helper\Unit