Skip to content

Commit

Permalink
Fix PHP 7.1 tests and Collision issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ifox committed May 26, 2020
1 parent fcac8c2 commit a576a1c
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,17 @@ install:

script:
- vendor/bin/php-cs-fixer --dry-run --config=./.php_cs.travis fix src/ tests/ || travis_terminate 1;
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
- |
if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then
vendor/bin/phpunit --configuration phpunit-7.1.xml
else
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
fi
after_script:
- |
if [[ "$TRAVIS_PHP_VERSION" == '7.3' ]]; then
if [[ "$TRAVIS_PHP_VERSION" == '7.4' ]]; then
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi
Expand Down
66 changes: 66 additions & 0 deletions phpunit-7.1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
verbose="true"
>
<listeners>
<listener class="NunoMaduro\Collision\Adapters\Phpunit\Listener" />
</listeners>
<testsuites>
<testsuite name="Twill Test Suites">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="false">
<directory suffix=".php">./src</directory>
<exclude>
<directory suffix=".blade.php">./tests</directory>
</exclude>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="tests/coverage/" lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-clover" target="tests/coverage/coverage-clover.xml" lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-text" target="php://stdout" showOnlySummary="true" showUncoveredFiles="false"/>
</logging>
<php>
<env name="APP_KEY" value="base64:DV8kQN5a+4MwAIQ5uk1WNafxO+/Efab0K20uVMDJ2UE="/>
<env name="APP_ENV" value="testing"/>
<env name="APP_URL" value="http://twill.test"/>
<env name="TELESCOPE_ENABLED" value="false"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
<env name="MAIL_DRIVER" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="LOG_CHANNEL" value="single"/>
<env name="MEDIA_LIBRARY_IMAGE_SERVICE" value="A17\Twill\Services\MediaLibrary\Glide"/>
<env name="MEDIA_LIBRARY_LOCAL_PATH" value="media-library"/>
<env name="MEDIA_LIBRARY_ENDPOINT_TYPE" value="local"/>
<env name="FILE_LIBRARY_FILE_SERVICE" value="A17\Twill\Services\MediaLibrary\Glide"/>
<env name="FILE_LIBRARY_LOCAL_PATH" value="file-library"/>
<env name="FILE_LIBRARY_ENDPOINT_TYPE" value="local"/>
<env name="IMGIX_SOURCE_HOST" value=""/>
<env name="IMGIX_USE_HTTPS" value=""/>
<env name="IMGIX_USE_SIGNED_URLS" value=""/>
<env name="IMGIX_SIGN_KEY" value=""/>
<env name="GLIDE_SOURCE" value="storage/app/public/media-library"/>
<env name="GLIDE_CACHE" value="storage/app/twill/cache"/>
<env name="GLIDE_CACHE_PATH_PREFIX" value="glide_cache"/>
<env name="GLIDE_BASE_URL" value="http://twill.test"/>
<env name="GLIDE_BASE_PATH" value="storage/media-library"/>
<env name="GLIDE_USE_SIGNED_URLS" value="false"/>
<env name="GLIDE_SIGN_KEY" value=""/>
</php>
</phpunit>

0 comments on commit a576a1c

Please sign in to comment.