Skip to content

Commit

Permalink
Merge pull request #3 from clue-labs/tests
Browse files Browse the repository at this point in the history
Update test suite to support PHPUnit 6 and PHPUnit 5 and support running on legacy PHP 5.3 through PHP 7.2 and HHVM
  • Loading branch information
clue authored Sep 28, 2018
2 parents fba4c54 + 24de057 commit b210dc8
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 22 deletions.
30 changes: 24 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
language: php

php:
- 5.6
- 5.5
# - 5.3 # requires old distro, see below
- 5.4
- 5.3
- hhvm
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- hhvm # ignore errors, see below

# lock distro so future defaults will not break the build
dist: trusty

matrix:
include:
- php: 5.3
dist: precise
allow_failures:
- php: hhvm

sudo: false

install:
- composer install --prefer-source --no-interaction
- composer install --no-interaction

script:
- php vendor/bin/phpunit --coverage-text
- vendor/bin/phpunit --coverage-text
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,26 @@ The recommended way to install this library is [through composer](http://getcomp
}
```

This project aims to run on any platform and thus does not require any PHP
extensions and supports running on legacy PHP 5.3 through current PHP 7+ and
HHVM.
It's *highly recommended to use PHP 7+* for this project.

## Tests

To run the test suite, you first need to clone this repo and then install all
dependencies [through Composer](https://getcomposer.org):

```bash
$ composer install
```

To run the test suite, go to the project root and run:

```bash
$ php vendor/bin/phpunit
```

## License

Released under the terms of the permissive [MIT license](http://opensource.org/licenses/MIT).
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"clue/graph": "~0.9.0|~0.8.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
"phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
},
"autoload": {
"psr-4": {"Graphp\\TrivialGraphFormat\\": "src/"}
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="tests/bootstrap.php"
<phpunit bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
Expand Down
3 changes: 2 additions & 1 deletion tests/TrivialGraphFormatTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

use Graphp\TrivialGraphFormat\TrivialGraphFormat;
use Fhaculty\Graph\Graph;
use Graphp\TrivialGraphFormat\TrivialGraphFormat;
use PHPUnit\Framework\TestCase;

class TrivialGraphFormatTest extends TestCase
{
Expand Down
13 changes: 0 additions & 13 deletions tests/bootstrap.php

This file was deleted.

0 comments on commit b210dc8

Please sign in to comment.