Skip to content

Commit

Permalink
Merge 9202cc9 into 8b7d9f5
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed Apr 29, 2019
2 parents 8b7d9f5 + 9202cc9 commit 80f5983
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .coveralls.yml
@@ -1 +1 @@
src_dir: src
coverage_clover: build/logs/clover.xml
7 changes: 3 additions & 4 deletions .travis.yml
Expand Up @@ -7,7 +7,7 @@ php:
- 7.0
- 7.1
- 7.2
- hhvm
- 7.3

matrix:
include:
Expand All @@ -17,7 +17,6 @@ matrix:
- php: 5.3
- php: 5.4
- php: 5.5
- php: hhvm

cache:
directories:
Expand All @@ -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
10 changes: 6 additions & 4 deletions composer.json
Expand Up @@ -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/" }
}
}
5 changes: 2 additions & 3 deletions phpunit.xml
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php"
>
<testsuites>
Expand All @@ -18,8 +17,8 @@
</testsuites>

<filter>
<whitelist>
<directory>./src/Woothee/</directory>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src/</directory>
</whitelist>
</filter>

Expand Down
2 changes: 1 addition & 1 deletion tests/Woothee/Tests/AgentCategory/Os/WindowsTest.php
Expand Up @@ -4,7 +4,7 @@

use Woothee\AgentCategory\Os\Windows;

class WindowsTest extends \PHPUnit_Framework_TestCase
class WindowsTest extends \Woothee\Tests\TestCase
{
public function setUp()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Woothee/Tests/ClassifierTest.php
Expand Up @@ -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();
}

Expand Down
9 changes: 9 additions & 0 deletions tests/Woothee/Tests/TestCase.php
@@ -0,0 +1,9 @@
<?php

namespace Woothee\Tests;

use PHPUnit\Framework\TestCase as PHPUnitTestCase;

abstract class TestCase extends PHPUnitTestCase
{
}
2 changes: 2 additions & 0 deletions tests/bootstrap.php
@@ -1,3 +1,5 @@
<?php

error_reporting(E_ALL);

require_once __DIR__ . '/polyfill.php';
14 changes: 14 additions & 0 deletions tests/polyfill.php
@@ -0,0 +1,14 @@
<?php

/**
* Polyfill for PHPUnit 4.8
*/

namespace PHPUnit\Framework
{
if (!class_exists('PHPUnit\\Framework\\TestCase')) {
abstract class TestCase extends PHPUnit_Framework_TestCase
{
}
}
}

0 comments on commit 80f5983

Please sign in to comment.