@@ -36,39 +36,30 @@ For sensitive email communications, please use [our PGP key](http://framework.ze
36
36
37
37
## RUNNING TESTS
38
38
39
- > ### Note: testing versions prior to 2.4
40
- >
41
- > This component originates with Zend Framework 2. During the lifetime of ZF2,
42
- > testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no
43
- > changes were necessary. However, due to the migration, tests may not run on
44
- > versions < 2.4. As such, you may need to change the PHPUnit dependency if
45
- > attempting a fix on such a version.
46
-
47
39
To run tests:
48
40
49
41
- Clone the repository:
50
42
51
43
``` console
52
- $ git clone git@ github.com: zendframework/zend-code.git
53
- $ cd
44
+ $ git clone git:// github.com/ zendframework/zend-code.git
45
+ $ cd zend-code
54
46
```
55
47
56
48
- Install dependencies via composer:
57
49
58
50
``` console
59
- $ curl -sS https://getcomposer.org/installer | php --
60
- $ ./composer.phar install
51
+ $ composer install
61
52
```
62
53
63
- If you don't have ` curl ` installed, you can also download ` composer.phar ` from https://getcomposer.org/
54
+ If you don't have ` composer ` installed, please download it from https://getcomposer.org/download /
64
55
65
- - Run the tests via ` phpunit ` and the provided PHPUnit config, like in this example :
56
+ - Run the tests using the "test" command shipped in the ` composer.json ` :
66
57
67
58
``` console
68
- $ ./vendor/bin/phpunit
59
+ $ composer test
69
60
```
70
61
71
- You can turn on conditional tests with the phpunit.xml file.
62
+ You can turn on conditional tests with the ` phpunit.xml ` file.
72
63
To do so:
73
64
74
65
- Copy ` phpunit.xml.dist ` file to ` phpunit.xml `
@@ -77,24 +68,22 @@ To do so:
77
68
78
69
## Running Coding Standards Checks
79
70
80
- This component uses [ php-cs-fixer] ( http://cs.sensiolabs.org/ ) for coding
81
- standards checks, and provides configuration for our selected checks.
82
- ` php-cs-fixer ` is installed by default via Composer.
71
+ First, ensure you've installed dependencies via composer, per the previous
72
+ section on running tests.
83
73
84
- To run checks only:
74
+ To run CS checks only:
85
75
86
76
``` console
87
- $ ./vendor/bin/php- cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
77
+ $ composer cs-check
88
78
```
89
79
90
- To have ` php-cs-fixer ` attempt to fix problems for you, omit the ` --dry-run `
91
- flag:
80
+ To attempt to automatically fix common CS issues:
92
81
93
82
``` console
94
- $ ./vendor/bin/php- cs-fixer fix . -v --diff --config-file=.php_cs
83
+ $ composer cs-fix
95
84
```
96
85
97
- If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
86
+ If the above fixes any CS issues, please re-run the tests to ensure
98
87
they pass, and make sure you add and commit the changes after verification.
99
88
100
89
## Recommended Workflow for Contributions
@@ -103,12 +92,12 @@ Your first step is to establish a public repository from which we can
103
92
pull your work into the master repository. We recommend using
104
93
[ GitHub] ( https://github.com ) , as that is where the component is already hosted.
105
94
106
- 1 . Setup a [ GitHub account] ( http ://github.com/) , if you haven't yet
107
- 2 . Fork the repository (http ://github.com/zendframework/zend-code )
95
+ 1 . Setup a [ GitHub account] ( https ://github.com/) , if you haven't yet
96
+ 2 . Fork the repository (https ://github.com/zendframework/zend-code )
108
97
3 . Clone the canonical repository locally and enter it.
109
98
110
99
``` console
111
- $ git clone git://github.com: zendframework/zend-code.git
100
+ $ git clone git://github.com/ zendframework/zend-code.git
112
101
$ cd zend-code
113
102
```
114
103
0 commit comments