diff --git a/.travis.yml b/.travis.yml
index 9f1d072..9e46813 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,33 +1,32 @@
-# See https://github.com/silverstripe/silverstripe-travis-support for setup details
-
-sudo: false
-
language: php
+env:
+ global:
+ - COMPOSER_ROOT_VERSION=4.0.x-dev
+
matrix:
include:
- - php: 5.3
- env: DB=MYSQL CORE_RELEASE=3.4
- - php: 5.4
- env: DB=MYSQL CORE_RELEASE=3.5
- php: 5.6
- env: DB=MYSQL CORE_RELEASE=3
- - php: 5.6
- env: DB=MYSQL CORE_RELEASE=3.5 SECUREASSETS=1
+ env: DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1
+ - php: 7.0
+ env: DB=MYSQL PHPUNIT_TEST=1
- php: 7.1
- env: DB=MYSQL CORE_RELEASE=3.6
+ env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1
before_script:
- - git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
- - "if [ \"$SECUREASSETS\" = \"\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss; fi"
- - "if [ \"$SECUREASSETS\" = \"1\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require silverstripe/secureassets; fi"
- - cd ~/builds/ss
+ # Init PHP
+ - phpenv rehash
+ - phpenv config-rm xdebug.ini
+
+ # Install composer dependencies
+ - composer install --prefer-dist
+ - composer require --prefer-dist --no-update silverstripe/framework:4.0.x-dev silverstripe/cms:4.0.x-dev silverstripe/admin:1.0.x-dev silverstripe/versioned:1.0.x-dev
+ - composer update
script:
- - vendor/bin/phpunit --coverage-clover coverage.clover userforms/tests
+ - if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
+ - if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
+ - if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs code/ tests/; fi
after_success:
- - mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/
- - cd ~/build/$TRAVIS_REPO_SLUG
- - wget https://scrutinizer-ci.com/ocular.phar
- - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
+ - if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi
diff --git a/_config.php b/_config.php
index a20e677..b3d9bbc 100644
--- a/_config.php
+++ b/_config.php
@@ -1,7 +1 @@
+
+ CodeSniffer ruleset for SilverStripe coding conventions.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644
index 0000000..5252575
--- /dev/null
+++ b/phpunit.xml.dist
@@ -0,0 +1,13 @@
+
+
+ tests/
+
+
+
+ code/
+
+ tests/
+
+
+
+
diff --git a/readme.md b/readme.md
index c2372d1..f970d51 100644
--- a/readme.md
+++ b/readme.md
@@ -3,9 +3,9 @@
UserForms enables CMS users to create dynamic forms via a drag and drop interface
and without getting involved in any PHP code.
-[![Build Status](http://img.shields.io/travis/silverstripe/silverstripe-userforms.svg?style=flat-square)](https://travis-ci.org/silverstripe/silverstripe-userforms)
-[![Code Quality](http://img.shields.io/scrutinizer/g/silverstripe/silverstripe-userforms.svg?style=flat-square)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-userforms)
-[![Code Coverage](http://img.shields.io/scrutinizer/coverage/g/silverstripe/silverstripe-userforms.svg?style=flat-square)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-userforms)
+[![Build Status](https://travis-ci.org/silverstripe/silverstripe-userforms.svg?branch=master)](https://travis-ci.org/silverstripe/silverstripe-userforms)
+[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/silverstripe/silverstripe-userforms/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-userforms/?branch=master)
+[![codecov](https://codecov.io/gh/silverstripe/silverstripe-userforms/branch/master/graph/badge.svg)](https://codecov.io/gh/silverstripe/silverstripe-userforms)
[![Version](http://img.shields.io/packagist/v/silverstripe/userforms.svg?style=flat-square)](https://packagist.org/packages/silverstripe/silverstripe-userforms)
[![License](http://img.shields.io/packagist/l/silverstripe/userforms.svg?style=flat-square)](LICENSE.md)
![helpfulrobot](https://helpfulrobot.io/silverstripe/userforms/badge)