phpunit.md 903 Bytes
Newer Older
Marc Egger's avatar
Newdoc  
Marc Egger committed
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
# phpunit

## run unit tests from commandline

After running `make bootstrap` go to the extension folder and run:

`vendor/bin/phpunit --configuration phpunit.xml`

## phpunit configurations

Phpunit configurations are stored in extension/phpunit.xml
Running the tests without specifying these configurations will not work.

## Autoloader

The test classes use the composer autoloader to reference to the source classes. 
The autoloader is loaded in extension/Source/bootstrap.php which in turn is executed by phpunit before each test
as specified in phpunit.xml by the line `<phpunit bootstrap="Source/bootstrap.php">`

## run tests on gitlab runner (i.e. without typo3 installation)

As defined in the phpunit command of projectRoot/Makefile.


The files phpunit_config.qfq.php and phpunit_LocalConfiguration.php are copied outside the extension since
they are necessary for the qfq bootstrap process.