Skip to content

Commit 305bc31

Browse files
committed
Switch to PHPUnit from PHPSpec
1 parent 15d8b31 commit 305bc31

11 files changed

+870
-545
lines changed

.gitattributes

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,5 @@
77
/.gitignore export-ignore
88
/.travis.yml export-ignore
99
/.scrutinizer.yml export-ignore
10-
/phpspec.yml export-ignore
11-
/phpspec-ci.yml export-ignore
12-
/phpunit.xml export-ignore
1310
/phpunit.xml.dist export-ignore
1411
/tests export-ignore
15-
/spec export-ignore

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
/vendor
2-
/coverage
3-
coverage.*
2+
/phpunit.xml

.scrutinizer.yml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
filter:
22
excluded_paths:
3-
- 'tests/*'
4-
- 'spec/*'
5-
3+
- "config/"
4+
- "resources/"
5+
- "routes/"
6+
- "tests/"
67
checks:
7-
php:
8-
code_rating: true
9-
duplication: true
10-
11-
coding_style:
128
php:
13-
spaces:
14-
around_operators:
15-
negation: true
16-
9+
code_rating: true
10+
remove_extra_empty_lines: true
11+
remove_php_closing_tag: true
12+
remove_trailing_whitespace: true
13+
fix_use_statements:
14+
remove_unused: true
15+
preserve_multiple: false
16+
preserve_blanklines: true
17+
order_alphabetically: true
18+
fix_php_opening_tag: true
19+
fix_linefeed: true
20+
fix_line_ending: true
21+
fix_identation_4spaces: true
22+
fix_doc_comments: true
1723
build:
18-
tests:
19-
override:
20-
-
21-
command: 'vendor/bin/phpspec run -f progress -c phpspec-ci.yml'
22-
coverage:
23-
file: 'coverage.clover'
24-
format: 'php-clover'
24+
tests:
25+
override:
26+
-
27+
command: 'vendor/bin/phpunit --coverage-clover=coverage.clover'
28+
coverage:
29+
file: 'coverage.clover'
30+
format: 'clover'

.travis.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
language: php
22

33
php:
4-
- 5.5
5-
- 5.6
64
- 7.0
7-
- hhvm
5+
- 7.1
6+
- 7.2
7+
8+
sudo: false
9+
10+
cache:
11+
directories:
12+
- $HOME/.composer/cache
813

914
before_script:
10-
- composer self-update
11-
- composer install --prefer-source --no-interaction --dev
15+
- travis_retry composer self-update
16+
- travis_retry composer update --no-interaction
1217

13-
script: vendor/bin/phpspec run
18+
script:
19+
- vendor/bin/phpunit

composer.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,29 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=5.5.9"
19+
"php": "^7.0"
2020
},
2121
"require-dev": {
22-
"phpspec/phpspec": "~2.0",
23-
"henrikbjorn/phpspec-code-coverage": "~1.0"
22+
"phpunit/phpunit": "^6.0"
23+
},
24+
"scripts": {
25+
"test": "phpunit"
2426
},
2527
"autoload": {
2628
"psr-4": {
2729
"CodeZero\\BrowserLocale\\": "src/"
2830
}
2931
},
30-
"minimum-stability": "stable"
32+
"autoload-dev": {
33+
"psr-4": {
34+
"CodeZero\\BrowserLocale\\Tests\\": "tests"
35+
}
36+
},
37+
"config": {
38+
"preferred-install": "dist",
39+
"sort-packages": true,
40+
"optimize-autoloader": true
41+
},
42+
"minimum-stability": "stable",
43+
"prefer-stable": true
3144
}

0 commit comments

Comments
 (0)