File tree 9 files changed +1817
-32
lines changed
9 files changed +1817
-32
lines changed Original file line number Diff line number Diff line change 8
8
/assets export-ignore
9
9
/.gitattributes export-ignore
10
10
/.gitignore export-ignore
11
+ /.phpcs.xml.dist export-ignore
11
12
/.travis.yml export-ignore
12
13
/CHANGELOG.md export-ignore
13
14
/CODE_OF_CONDUCT.md export-ignore
14
- /.phpcs. xml.dist export-ignore
15
+ /phpunit. xml.dist export-ignore
15
16
/README.md export-ignore
16
17
/readme.txt export-ignore
Original file line number Diff line number Diff line change 1
1
vendor /
2
2
/.phpcs.xml
3
3
/phpcs.xml
4
+ /phpunit.xml
Original file line number Diff line number Diff line change 9
9
<arg name =" report" value =" summary" />
10
10
<arg name =" report" value =" source" />
11
11
<rule ref =" ObjectCalisthenics" />
12
- <rule ref =" PHPCompatibility" />
12
+ <rule ref =" PHPCompatibility" >
13
+ <exclude-pattern >tests</exclude-pattern >
14
+ </rule >
13
15
<config name =" testVersion" value =" 7.0-" />
14
16
<rule ref =" WordPress" >
15
17
<exclude name =" WordPress.VIP" />
Original file line number Diff line number Diff line change 16
16
matrix :
17
17
fast_finish : true
18
18
include :
19
- # Run PHP CodeSniffer and XMLLint against just PHP 7.0 job.
20
- - php : 7.0
19
+ # Run PHP CodeSniffer and XMLLint against just PHP 7.1 job, even
20
+ # though the PHPCompatibility config checks against 7.0.
21
+ - php : 7.1
21
22
env : SNIFF=1 LINT=1
22
23
addons :
23
24
apt :
@@ -46,3 +47,6 @@ script:
46
47
# Check coding standards. Run through composer script, to allow
47
48
# PHP 5.2 compatibility check of main plugin file.
48
49
- if [[ "$SNIFF" == "1" ]]; then composer phpcs; fi
50
+
51
+ # Run tests.
52
+ - ./vendor/bin/phpunit --testsuite unit
Original file line number Diff line number Diff line change 28
28
},
29
29
"require-dev" : {
30
30
"php" : " ^7.1" ,
31
+ "brain/monkey" : " ^2.1" ,
31
32
"dealerdirect/phpcodesniffer-composer-installer" : " ^0.4.3" ,
32
33
"object-calisthenics/phpcs-calisthenics-rules" : " ^3" ,
34
+ "phpunit/phpunit" : " ^6.4" ,
33
35
"squizlabs/php_codesniffer" : " 3.1" ,
34
36
"wimg/php-compatibility" : " dev-master" ,
35
37
"wp-coding-standards/wpcs" : " dev-develop"
36
38
},
39
+ "autoload" : {
40
+ "psr-4" : {
41
+ "Gamajo\\ GenesisJsNoJs\\ " : " src/"
42
+ }
43
+ },
44
+ "autoload-dev" : {
45
+ "psr-4" : {
46
+ "Gamajo\\ GenesisJsNoJs\\ Tests\\ " : " tests/"
47
+ }
48
+ },
37
49
"scripts" : {
38
50
"install-codestandards" : [
39
51
" Dealerdirect\\ Composer\\ Plugin\\ Installers\\ PHPCodeSniffer\\ Plugin::run"
40
52
],
41
- "phpcs" : " phpcs && phpcs ./genesis-js-no-js.php -sp --standard=PHPCompatibility --runtime-set testVersion 5.2"
53
+ "phpcs" : " phpcs && phpcs ./genesis-js-no-js.php -sp --standard=PHPCompatibility --runtime-set testVersion 5.2 && phpcs ./tests -sp --standard=PHPCompatibility --runtime-set testVersion 7.1 "
42
54
}
43
55
}
You can’t perform that action at this time.
0 commit comments