Skip to content

Commit 4e3fe53

Browse files
theofidrydunglas
authored andcommitted
Add e2e tests (#106)
Also fix some bugs and tests.
1 parent e648ae3 commit 4e3fe53

File tree

11 files changed

+3301
-9
lines changed

11 files changed

+3301
-9
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/composer.phar
2-
/composer.lock
32
/box.phar
43
/vendor
54
/build

.php_cs.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ $finder = PhpCsFixer\Finder::create()
1313
->in(__DIR__)
1414
->exclude('tests/Fixtures/app/cache')
1515
->exclude('build')
16+
->exclude('tests/e2e')
1617
;
1718

1819
return PhpCsFixer\Config::create()

.travis.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,15 @@ script:
3333
- if [[ $coverage = 1 ]]; then phpdbg -qrr phpunit-6.3.phar --coverage-clover build/logs/clover.xml; else php phpunit-6.3.phar; fi
3434
- if [[ $lint = 1 ]]; then php php-cs-fixer.phar fix --dry-run --diff --no-ansi; fi
3535
- if [[ $lint = 1 ]]; then phpstan analyse -l5 --ansi src; fi
36-
- if [[ ! $deps && $TRAVIS_PHP_VERSION = "7.1" ]]; then php box.phar build; fi;
36+
- |
37+
if [[ ! $deps && $TRAVIS_PHP_VERSION = "7.1" ]]; then
38+
composer install --no-dev --prefer-dist --classmap-authoritative --no-progress --no-suggest --ansi;
39+
php -d phar.readonly=0 box.phar build;
40+
php schema.phar generate-types tmp/ tests/e2e/schema.yml;
41+
diff tests/e2e/src/AppBundle/Entity/Person.php tmp/AppBundle/Entity/Person.php;
42+
diff tests/e2e/src/AppBundle/Entity/PostalAddress.php tmp/AppBundle/Entity/PostalAddress.php;
43+
diff tests/e2e/src/AppBundle/Entity/Thing.php tmp/AppBundle/Entity/Thing.php;
44+
fi;
3745
3846
after_success:
3947
- if [[ $coverage = 1 ]]; then travis_retry php coveralls.phar; fi

box.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2-
"directories": ["src/"],
2+
"directories": [
3+
"data/",
4+
"src/",
5+
"templates/"
6+
],
37
"finder": [
48
{
59
"name": "*.php",
@@ -11,7 +15,7 @@
1115
"Tests",
1216
"tests"
1317
],
14-
"in": "vendor"
18+
"in": "vendor/"
1519
}
1620
],
1721
"compactors": [

0 commit comments

Comments
 (0)