Skip to content

Commit

Permalink
Add PHPUnit to travis conf
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek- committed Dec 20, 2018
1 parent 5193dcd commit 6a73da3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3

branches:
only:
Expand All @@ -12,3 +14,4 @@ install:
- composer install --prefer-source
script:
- ./vendor/bin/phpspec run
- ./vendor/bin/phpunit
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
"license": "MIT",
"description": "Just some tools to work better with PHP",
"autoload": {
"psr-4": { "Nekland\\Tools\\": "src/Tools/" }
"psr-4": { "Nekland\\Tools\\": "src/Tools/", "Nekland\\Utils\\": "src/Utils/" }
},
"autoload-dev": {
"psr-4": { "Nekland\\Utils\\Test\\": "tests/Nekland/Utils/" }
},
"require": {
"php": "^5.6 || ^7.0"
},
"require-dev": {
"phpspec/phpspec": "^3.2",
"bossa/phpspec2-expect": "^2.3"
"bossa/phpspec2-expect": "^2.3",
"phpunit/phpunit": "^7.5"
},
"_comment": [
"PHPSpec is limited to ^3.2 to keep compatibility with PHP5.6"
Expand Down
20 changes: 20 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="Nekland Tools">
<directory suffix="Test.php">./tests/Nekland</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./</directory>
<exclude>
<directory>./docs</directory>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
</phpunit>

0 comments on commit 6a73da3

Please sign in to comment.