Skip to content

Commit

Permalink
Merge pull request #22 from SimonFrings/tests
Browse files Browse the repository at this point in the history
Update PHPUnit configuration schema for PHPUnit 9.3
  • Loading branch information
clue authored Oct 23, 2020
2 parents a4bf529 + da306c2 commit 5953096
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
/.travis.yml export-ignore
/examples/ export-ignore
/phpunit.xml.dist export-ignore
/phpunit.xml.legacy export-ignore
/tests/ export-ignore
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ install:
- composer install

script:
- vendor/bin/phpunit --coverage-text
- if [[ "$TRAVIS_PHP_VERSION" > "7.2" ]]; then vendor/bin/phpunit --coverage-text; fi
- if [[ "$TRAVIS_PHP_VERSION" < "7.3" ]]; then vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy; fi
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"require-dev": {
"clue/block-react": "^1.3",
"phpunit/phpunit": "^9.0 || ^5.7 || ^4.8.36",
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36",
"react/http": "^1.0",
"react/mysql": "^0.5.3"
}
Expand Down
17 changes: 11 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="vendor/autoload.php" colors="true">
<!-- PHPUnit configuration file with new format for PHPUnit 9.3+ -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
cacheResult="false">
<testsuites>
<testsuite name="Tests">
<testsuite name="Ssh Proxy Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<coverage>
<include>
<directory>./src/</directory>
</whitelist>
</filter>
</include>
</coverage>
</phpunit>
18 changes: 18 additions & 0 deletions phpunit.xml.legacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- PHPUnit configuration file with old format for PHPUnit 9.2 or older -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true">
<testsuites>
<testsuite name="Ssh Proxy Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>./src/</directory>
</whitelist>
</filter>
</phpunit>
1 change: 0 additions & 1 deletion tests/FunctionalSshProcessConnectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Clue\Tests\React\SshProxy;

use PHPUnit\Framework\TestCase;
use React\EventLoop\Factory;
use Clue\React\SshProxy\SshProcessConnector;

Expand Down

0 comments on commit 5953096

Please sign in to comment.