You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/INSTALLATION.md
+41-6
Original file line number
Diff line number
Diff line change
@@ -83,16 +83,51 @@ Install [Composer](https://getcomposer.org) following your devices OS [installat
83
83
84
84
## Install PHPUnit
85
85
86
-
### Via Composer
86
+
### Via PHP Archive (PHAR)
87
+
88
+
The easiest way to use PHPUnit for Exercism exercises is downloading a distribution that is packaged as a PHP Archive (PHAR), which is also the recommended way to use PHPUnit.
89
+
Store the PHAR where you stored the `exercism` CLI to run PHPUnit from wherever you are.
87
90
88
-
PHPUnit version 10 can be installed globally via [Composer](https://getcomposer.org), using the following command:
91
+
You can download a release of PHPUnit packages as a PHP archive:
Please make sure you install version 10.5 or later.
103
+
And move it to the same location as you moved the `exercism` CLI, naming the command `phpunit`:
104
+
105
+
```shell
106
+
mv phpunit.phar ~/bin/phpunit
107
+
```
108
+
109
+
Now you can run `phpunit` from wherever you are, as shown in the [PHP track testing docs](https://exercism.org/docs/tracks/php/tests):
110
+
111
+
```shell
112
+
phpunit --version
113
+
```
95
114
96
-
### Manual installation
115
+
The output should look like this:
116
+
117
+
```
118
+
PHPUnit 10.5.45 by Sebastian Bergmann and contributors.
119
+
120
+
```
121
+
122
+
123
+
You can also follow the official [Installing PHPUnit instructions](https://docs.phpunit.de/en/10.5/installation.html#installing-phpunit) to install PHPUnit.
124
+
125
+
### Via Composer
126
+
127
+
PHPUnit version 10 can also be installed globally via [Composer](https://getcomposer.org), using the following command:
128
+
129
+
```shell
130
+
composer global require phpunit/phpunit ^10.5
131
+
```
97
132
98
-
If you are not using Composer package manager, follow the official [Installing PHPUnit instructions](https://docs.phpunit.de/en/10.5/installation.html#installing-phpunit).
133
+
Please make sure you install version 10.5 or later.
0 commit comments