Skip to content

Commit 137df9c

Browse files
committed
Attempt to add basic integration testing
1 parent 57d4c14 commit 137df9c

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.travis.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,24 @@ php:
77
before_script:
88
- if php --ri xdebug >/dev/null; then phpenv config-rm xdebug.ini; fi
99
before_install:
10-
- composer self-update
1110
- composer global require "hirak/prestissimo:^0.3"
1211
install:
1312
- composer install --no-interaction
1413
script:
14+
# Inspections
1515
- ./vendor/bin/phpcs src
1616
- ./vendor/bin/phpstan analyze src
17+
18+
# Try to add to a Drupal setup.
19+
- composer create-project drupal-composer/drupal-project:8.x-dev $TRAVIS_BUILD_DIR/../drupal --no-interaction
20+
- cd $TRAVIS_BUILD_DIR/../drupal
21+
22+
# Install dependency.
23+
- composer config repositories.0 path $TRAVIS_BUILD_DIR
24+
- composer require mglaman/phpstan-drupal
25+
- cp $TRAVIS_BUILD_DIR/tests/fixtures/drupal-phpstan.neon phpstan.neon
26+
- ./vendor/bin/phpstan analyze web/core/install.php
27+
1728
cache:
1829
directories:
1930
- $HOME/.composer/cache

tests/fixtures/drupal-phpstan.neon

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
parameters:
2+
excludes_analyse:
3+
- *Test.php
4+
- *TestBase.php
5+
level: 0
6+
includes:
7+
- vendor/mglaman/phpstan-drupal/extension.neon

0 commit comments

Comments
 (0)