diff --git a/.coveralls.yml b/.coveralls.yml index 7a18ce2..f6e9ef4 100644 --- a/.coveralls.yml +++ b/.coveralls.yml @@ -1 +1 @@ -src_dir: src +coverage_clover: build/logs/clover.xml diff --git a/.travis.yml b/.travis.yml index 6ace717..dbf0eb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ php: - 7.0 - 7.1 - 7.2 - - hhvm + - 7.3 matrix: include: @@ -17,7 +17,6 @@ matrix: - php: 5.3 - php: 5.4 - php: 5.5 - - php: hhvm cache: directories: @@ -28,5 +27,5 @@ before_script: script: vendor/bin/phpunit -after_script: - - vendor/bin/coveralls -v +after_success: + - if [ -f vendor/bin/php-coveralls ] ; then travis_retry php vendor/bin/php-coveralls -v; else travis_retry php vendor/bin/coveralls -v; fi diff --git a/composer.json b/composer.json index f8a4b3d..d16995f 100644 --- a/composer.json +++ b/composer.json @@ -13,12 +13,14 @@ "php": ">= 5.3.3" }, "require-dev": { - "phpunit/phpunit": "4.8.*", - "satooshi/php-coveralls": "0.6.*", - "symfony/yaml": "2.7.*", - "fabpot/php-cs-fixer": "1.10.*" + "phpunit/phpunit": "^7.5 || ^4.8", + "php-coveralls/php-coveralls": "^2.1 || ^1.1", + "symfony/yaml": "^4.2 || ^2.7" }, "autoload": { "psr-4": { "Woothee\\": "src/" } + }, + "autoload-dev": { + "psr-4": { "Woothee\\": "tests/Woothee/" } } } diff --git a/phpunit.xml b/phpunit.xml index 391b067..8b4b059 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -8,7 +8,6 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" bootstrap="tests/bootstrap.php" > @@ -18,8 +17,8 @@ - - ./src/Woothee/ + + src/ diff --git a/tests/Woothee/Tests/AgentCategory/Os/WindowsTest.php b/tests/Woothee/Tests/AgentCategory/Os/WindowsTest.php index c46573c..4430516 100644 --- a/tests/Woothee/Tests/AgentCategory/Os/WindowsTest.php +++ b/tests/Woothee/Tests/AgentCategory/Os/WindowsTest.php @@ -4,7 +4,7 @@ use Woothee\AgentCategory\Os\Windows; -class WindowsTest extends \PHPUnit_Framework_TestCase +class WindowsTest extends \Woothee\Tests\TestCase { public function setUp() { diff --git a/tests/Woothee/Tests/ClassifierTest.php b/tests/Woothee/Tests/ClassifierTest.php index 9b48bb4..dda700e 100644 --- a/tests/Woothee/Tests/ClassifierTest.php +++ b/tests/Woothee/Tests/ClassifierTest.php @@ -5,10 +5,11 @@ use Symfony\Component\Yaml\Yaml; use Woothee\Classifier; -class ClassifierTest extends \PHPUnit_Framework_TestCase +class ClassifierTest extends TestCase { public function setUp() { + parent::setUp(); $this->classifier = new Classifier(); } diff --git a/tests/Woothee/Tests/TestCase.php b/tests/Woothee/Tests/TestCase.php new file mode 100644 index 0000000..fc78e5c --- /dev/null +++ b/tests/Woothee/Tests/TestCase.php @@ -0,0 +1,9 @@ +