-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnotes.txt
More file actions
49 lines (35 loc) · 1.29 KB
/
notes.txt
File metadata and controls
49 lines (35 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#-----------------------------------------------------------------
# PHPUNIT :
## php.ini :
- decommenter ligne :
extension=php_mbstring.dll
extension=php_openssl.dll
extension_dir="ext" // pour windows
## Composer :
- installer phpunit
composer init
require-dev (uniquement)
"phpunit/phpunit"
composer install
#-----------------------------------------------------------------
# EXECUTER PHPUNIT :
## Source :
https://phpunit.de/getting-started-with-phpunit.html
## TestDox (rendu visuel)
phpunit --bootstrap vendor/autoload.php --testdox tests
## Executer la section nommee "money" du fichier phpunit.xml :
phpunit -c phpunit.xml --testsuite money
## Test execution
phpunit --bootstrap vendor/autoload.php tests/EmailTest
#-----------------------------------------------------------------
# GENERER LE COVERAGE (=visuel de stat) :
Source : https://phpunit.de/manual/current/en/code-coverage-analysis.html
Commande pour générer les fichiers html (statistique) :
phpunit --coverage-html coverage
#-----------------------------------------------------------------
# INSTALLER PHPUNIT SUR WINDOWS :
Créer fichier phpunit.cmd, avec comme contenu
@php "%~dp0phpunit-6.4.4.phar" %*
Sauver
Double cliquer sur le fichier phpunit.cmd
#-----------------------------------------------------------------