Update PHPUnit settings

- Move "tests/phpunit.xml" to "phpunit.xml.dist"
- Update documentation and contributing documents
- Update Travis settings
- Add "phpunit.xml" in the Git ignore list
This commit is contained in:
Henrique Moody 2015-01-07 02:55:07 -02:00
parent ea7b787953
commit 2b97bbba22
5 changed files with 26 additions and 31 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
Makefile
phpunit.xml
vendor/

View file

@ -18,10 +18,9 @@ cache:
before_script:
- composer install --dev --no-interaction --prefer-source
- phpenv rehash
script:
- vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover=coverage.clover --testdox tests/
- vendor/bin/phpunit --configuration phpunit.xml.dist --colors --coverage-clover=coverage.clover
after_script:
- wget https://scrutinizer-ci.com/ocular.phar

View file

@ -113,8 +113,23 @@ and will natively have support for chaining and everything else.
## Running Tests
Make sure you have PHPUnit installed. Instructions can be found on http://phpunit.de.
Then, go to the `tests` folder on your terminal and type `phpunit .`. No test should fail.
After run `composer install` on the library's root directory you must run PHPUnit.
### Linux
You can test the project using the commands:
```sh
$ vendor/bin/phpunit
```
### Windows
You can test the project using the commands:
```sh
$ vendor\bin\phpunit
```
No test should fail.
## Sending your code to us

View file

@ -24,29 +24,6 @@ Autoloading is [PSR-4](https://github.com/php-fig/fig-standards/blob/master/acce
composer require respect/validation
```
Test
----
### Linux
You can test the project using the commands:
```sh
$ cd <project folder>
$ curl -sS https://getcomposer.org/installer | php
$ composer.phar install
$ vendor/bin/phpunit tests
```
### Windows
You can test the project using the commands:
```sh
$ cd <project folder>
$ curl -sS https://getcomposer.org/installer | php
$ composer.phar install
$ vendor\bin\phpunit tests
```
Feature Guide
-------------

View file

@ -1,8 +1,6 @@
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap.php"
backupStaticAttributes="false"
cacheTokens="true"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
@ -10,9 +8,14 @@
stopOnFailure="false"
syntaxCheck="false"
verbose="false">
<testsuites>
<testsuite>
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>../library/</directory>
<directory>library/</directory>
</whitelist>
</filter>
</phpunit>