From 7e735e17ea87d280f032f9cf393b4d96837efc6f Mon Sep 17 00:00:00 2001 From: peter279k Date: Sat, 14 Apr 2018 16:37:51 +0800 Subject: [PATCH] Test enhancement --- .travis.yml | 10 ++++++++-- composer.json | 14 +++++++++++--- phpunit.xml | 8 ++++++++ tests/bootstrap.php | 2 +- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a941551..6f760ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,24 @@ # see http://about.travis-ci.org/docs/user/languages/php/ for more hints language: php -dist: precise # list any PHP version you want to test against php: - - 5.3 - 5.4 - 5.5 - 5.6 + - 7.0 + - 7.1 + - 7.2 + - nightly - hhvm matrix: allow_failures: - php: hhvm + - php: nightly + include: + - php: 5.3 + dist: precise before_script: - composer install diff --git a/composer.json b/composer.json index 066dda7..30e5c96 100644 --- a/composer.json +++ b/composer.json @@ -16,11 +16,19 @@ "php": ">=5.3.2" }, "require-dev": { - "phpunit/phpunit": "~4.8.35" + "phpunit/phpunit": "^4.8.35 || ^5.5 || ^6.5" + }, + "suggest": { + "ext-mbstring": "It can support the multiple bytes string length." }, "autoload": { - "psr-0": { - "Valitron": "src/" + "psr-4": { + "Valitron\\": "src/Valitron" + } + }, + "autoload-dev": { + "psr-4": { + "Valitron\\": "tests/Valitron" } }, "scripts": { diff --git a/phpunit.xml b/phpunit.xml index 5693a09..f23518b 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -15,4 +15,12 @@ tests/Valitron + + + src/ + + + vendor/ + + diff --git a/tests/bootstrap.php b/tests/bootstrap.php index b4dcfb1..e33ce82 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -16,4 +16,4 @@ if($vendorPos !== false) { $loader = require __DIR__.'/../vendor/autoload.php'; } -require_once __DIR__ . '/Valitron/BaseTestCase.php'; \ No newline at end of file +require_once __DIR__ . '/Valitron/BaseTestCase.php';