Skip to content

Commit b50d061

Browse files
VolChDavertMik
authored andcommitted
[WIP] Symfony 4.0 & Flex demo (Codeception#9)
* Install Codeception * Bootstrap Codeception & configure suites for Symfonys * Add codeception run to Travis CI * Replace DefaultControllerTest to Cepts * Use Doctrine2 module to grab entity * Add NewCommentCest
1 parent 2ef8e8e commit b50d061

26 files changed

+2356
-210
lines changed

.php_cs.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $finder = PhpCsFixer\Finder::create()
1515
->exclude('var')
1616
->exclude('public/bundles')
1717
->exclude('public/build')
18+
->exclude('tests') // Codeception & Symfony coding standards are different
1819
;
1920

2021
return PhpCsFixer\Config::create()

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ before_install:
2626
install:
2727
- composer install
2828
- ./vendor/bin/simple-phpunit install
29+
- ./vendor/bin/codecept build
2930

3031
script:
3132
- ./vendor/bin/simple-phpunit
33+
- ./vendor/bin/codecept run
3234
# this checks that the source code follows the Symfony Code Syntax rules
3335
- '[[ "$TRAVIS_PHP_VERSION" == "nightly" ]] || ./vendor/bin/php-cs-fixer fix --diff --dry-run -v'
3436
# this checks that the YAML config files contain no syntax errors

codeception.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace: App\Tests
2+
paths:
3+
tests: tests
4+
output: tests/_output
5+
data: tests/_data
6+
support: tests/_support
7+
envs: tests/_envs
8+
actor_suffix: Tester
9+
extensions:
10+
enabled:
11+
- Codeception\Extension\RunFailed
12+
params:
13+
- .env

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"white-october/pagerfanta-bundle": "^1.1"
3131
},
3232
"require-dev": {
33+
"codeception/codeception": "2.3.x-dev",
3334
"dama/doctrine-test-bundle": "^4.0",
3435
"friendsofphp/php-cs-fixer": "^2.7",
3536
"symfony/browser-kit": "^4.0",
@@ -39,7 +40,8 @@
3940
"symfony/phpunit-bridge": "^4.0",
4041
"symfony/profiler-pack": "^1.0",
4142
"symfony/var-dumper": "^4.0",
42-
"symfony/web-server-bundle": "^4.0"
43+
"symfony/web-server-bundle": "^4.0",
44+
"vlucas/phpdotenv": "^2.4"
4345
},
4446
"config": {
4547
"platform": {

0 commit comments

Comments
 (0)