Skip to content
This repository was archived by the owner on Nov 13, 2018. It is now read-only.

Commit 5974380

Browse files
committed
Update phpunit to 5.6 & min php version 7
1 parent 50fe450 commit 5974380

File tree

7 files changed

+1285
-12
lines changed

7 files changed

+1285
-12
lines changed

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,11 @@ git:
1414

1515
# Define the php versions against we want to test our code
1616
php:
17-
- 5.6
1817
- 7.0
1918

2019

2120
matrix:
2221
fast_finish: true
23-
allow_failures:
24-
- php: 7.0
2522

2623

2724
# We don't want to run linux commands as super user
@@ -45,7 +42,7 @@ before_script:
4542

4643
# Testing the app (see phpunit.xml), generating Code Coverage report
4744
script:
48-
- phpunit --coverage-clover build/logs/clover.xml
45+
- ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml
4946

5047

5148
#after_script:

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66

77

88
### Prerequisites
9-
* php v5.6.26+ || v7.0+
10-
* [phpunit](https://github.com/sebastianbergmann/phpunit/) v5.4.6
9+
* php v7.0+, [requirements](https://phpunit.de/manual/current/en/installation.html#installation.requirements)
10+
* [phpunit](https://github.com/sebastianbergmann/phpunit/) v5.6.0
1111
* [php-coveralls](https://github.com/satooshi/php-coveralls) v1.0.1
12-
* php [Xdebug](https://xdebug.org/) extension
12+
* php [Xdebug](https://xdebug.org/) extension v2.5.0+
1313

1414
### Test on localhost
1515
```
1616
cd path/to/this-project
17-
phpunit
17+
composer install
18+
composer run test
1819
```
1920

2021
#### Resources

app/Classes/Calculator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function subtractTwo($x, $y)
5555

5656
/**
5757
* Divide two numbers
58-
* //TODO Handle divide by zero
58+
* //todo Handle divide by zero
5959
*
6060
* @param $x
6161
* @param $y

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@
1010
"require": {
1111
},
1212
"require-dev": {
13+
"phpunit/phpunit": "^6.0"
1314
},
1415
"autoload": {
1516
"classmap": [
1617
"app/Classes"
1718
]
1819
},
20+
"scripts": {
21+
"test": "./vendor/bin/phpunit"
22+
},
1923
"config": {
2024
"preferred-install": "dist",
2125
"optimize-autoloader": true

0 commit comments

Comments
 (0)