Skip to content

Commit d9719f6

Browse files
whiklojlanthaler
authored andcommitted
Test PHP 7.2, switch to PSR-4 and require PHPUnit instead if implicitely depending on it (#6)
1 parent a04d4f9 commit d9719f6

File tree

6 files changed

+22
-31
lines changed

6 files changed

+22
-31
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
build/
2+
vendor/

.travis.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
language: php
2-
3-
php:
4-
- 5.3
5-
- 5.4
6-
- 5.5
7-
- 5.6
8-
- 7.0
9-
- hhvm
2+
dist: trusty
103

114
matrix:
12-
fast_finish: true
135
include:
6+
- php: 5.3
7+
dist: precise
8+
- php: 5.4
149
- php: 5.5
1510
env: COVERAGE=true
11+
- php: 5.6
12+
- php: 7.0
13+
- php: 7.1
14+
- php: 7.2
15+
- php: hhvm
1616

1717
install:
1818
- composer install
1919

2020
before_script:
21-
- vendor/bin/http_test_server > /dev/null 2>&1 &
2221
- if [[ "$COVERAGE" = true ]]; then PHPUNIT_FLAGS="--coverage-clover build/coverage.xml"; else PHPUNIT_FLAGS=""; fi
2322

2423
script:
25-
- phpunit $PHPUNIT_FLAGS
24+
- vendor/bin/phpunit $PHPUNIT_FLAGS
2625

2726
after_success:
2827
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi

Test/IriTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
namespace ML\IRI\Test;
1111

1212
use ML\IRI\IRI;
13+
use PHPUnit\Framework\TestCase;
1314

1415
/**
1516
* The IRI test suite.
1617
*
1718
* @author Markus Lanthaler <[email protected]>
1819
*/
19-
class IriTest extends \PHPUnit_Framework_TestCase
20+
class IriTest extends TestCase
2021
{
2122
/**
2223
* Test parsing

Test/bootstrap.php

Lines changed: 0 additions & 12 deletions
This file was deleted.

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,14 @@
1717
"php": ">=5.3.0",
1818
"lib-pcre": ">=4.0"
1919
},
20+
"require-dev": {
21+
"phpunit/phpunit": "4.8.*"
22+
},
2023
"autoload": {
21-
"psr-0": { "ML\\IRI": "" }
24+
"psr-4": {
25+
"ML\\IRI\\": "",
26+
"ML\\IRI\\Test\\": "Test/"
27+
}
2228
},
2329
"target-dir": "ML/IRI"
2430
}

phpunit.xml.dist

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
convertWarningsToExceptions="true"
88
processIsolation="false"
99
stopOnFailure="false"
10-
strict="true"
11-
bootstrap="./Test/bootstrap.php">
10+
bootstrap="vendor/autoload.php">
1211

1312
<testsuites>
1413
<testsuite name="IRI Test Suite">
@@ -18,10 +17,7 @@
1817

1918
<filter>
2019
<whitelist processUncoveredFilesFromWhitelist="true">
21-
<directory>./</directory>
22-
<exclude>
23-
<directory>./Test</directory>
24-
</exclude>
20+
<file>IRI.php</file>
2521
</whitelist>
2622
</filter>
2723

0 commit comments

Comments
 (0)