Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test suite by adding test instructions and adding PHPUnit to require-dev #12

Merged
merged 2 commits into from
May 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
language: php

php:
- 5.3
# - 5.3 # requires old distro, see below
- 5.4
- 5.5
- 5.6
- 7
- hhvm
- 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 --no-interaction

script:
- phpunit --coverage-text
- vendor/bin/phpunit --coverage-text
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ But many other tools may need similar parsing during their runtime.
* [split()](#split)
* [UnclosedQuotesException](#unclosedquotesexception)
* [Install](#install)
* [Tests](#tests)
* [License](#license)
* [More](#more)

Expand Down Expand Up @@ -67,7 +68,7 @@ Alternatively, you can also refer to them with their fully-qualified name:

```php
\Clue\Arguments\split(…);
```
```

#### split()

Expand Down Expand Up @@ -230,6 +231,26 @@ $ composer require clue/arguments:^2.0

See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.

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](http://getcomposer.org):

```bash
$ composer install
```

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

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

## License

MIT
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"require": {
"php": ">=5.3"
},
"require-dev": {
"phpunit/phpunit": "^7.0 || ^6.0 || ^5.7 || ^4.8.35"
},
"autoload": {
"files": [ "src/functions.php" ],
"psr-4": { "Clue\\Arguments\\": "src/" }
Expand Down
2 changes: 1 addition & 1 deletion tests/SplitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use Clue\Arguments;

class SplitTest extends PHPUnit_Framework_TestCase
class SplitTest extends PHPUnit\Framework\TestCase
{
public function testEmptyString()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/UnclosedQuotesExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use Clue\Arguments\UnclosedQuotesException;

class UnclosedQuotesExceptionTest extends PHPUnit_Framework_TestCase
class UnclosedQuotesExceptionTest extends PHPUnit\Framework\TestCase
{
public function testCtorWithOnlyQuotesAppliesMessage()
{
Expand Down