From d71a40a018341054f82d2962225382f247a82635 Mon Sep 17 00:00:00 2001 From: peter279k Date: Mon, 2 Mar 2020 13:21:56 +0800 Subject: [PATCH] Test enhancement --- .php_cs | 2 +- .travis.yml | 11 ++++++++++- tests/DictionaryTest.php | 2 +- tests/Number/BigInt/ConverterTest.php | 2 +- tests/ShortenerTest.php | 2 +- 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.php_cs b/.php_cs index 96461d2..62bdf01 100644 --- a/.php_cs +++ b/.php_cs @@ -12,4 +12,4 @@ return PhpCsFixer\Config::create() ->in(__DIR__.DIRECTORY_SEPARATOR.'tests') ) ->setRiskyAllowed(true) - ->setUsingCache(true); \ No newline at end of file + ->setUsingCache(true); diff --git a/.travis.yml b/.travis.yml index 63e5354..3024998 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,9 @@ sudo: false php: - 7.0 - 7.1 + - 7.2 + - 7.3 + - 7.4 ## Build matrix for lowest and highest possible targets matrix: @@ -11,6 +14,12 @@ matrix: - php: 7.0 env: dependencies=lowest - php: 7.1 + env: dependencies=lowest + - php: 7.2 + env: dependencies=lowest + - php: 7.3 + env: dependencies=lowest + - php: 7.4 env: dependencies=highest ## Update composer and run the appropriate composer command @@ -20,4 +29,4 @@ before_script: - if [ -z "$dependencies" ]; then composer install; fi; - if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest -n; fi; - if [ "$dependencies" = "highest" ]; then composer update -n; fi; - - composer show -i \ No newline at end of file + - composer show -i diff --git a/tests/DictionaryTest.php b/tests/DictionaryTest.php index 32aa243..1e74050 100644 --- a/tests/DictionaryTest.php +++ b/tests/DictionaryTest.php @@ -14,7 +14,7 @@ class DictionaryTest extends TestCase */ private $dictionary; - public function setup() + protected function setUp() { $this->dictionary = new Dictionary('23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'); } diff --git a/tests/Number/BigInt/ConverterTest.php b/tests/Number/BigInt/ConverterTest.php index 9918e13..2a8db03 100644 --- a/tests/Number/BigInt/ConverterTest.php +++ b/tests/Number/BigInt/ConverterTest.php @@ -15,7 +15,7 @@ class ConverterTest extends TestCase */ private $converter; - public function setup() + protected function setUp() { $this->converter = new Converter(); } diff --git a/tests/ShortenerTest.php b/tests/ShortenerTest.php index edf0bea..3a8ff99 100644 --- a/tests/ShortenerTest.php +++ b/tests/ShortenerTest.php @@ -16,7 +16,7 @@ class ShortenerTest extends TestCase */ private $shortener; - public function setup() + protected function setUp() { $this->shortener = new Shortener( Dictionary::createUnmistakable(),