PHPUnit autoload file for PhpStorm
authorAleksey Bekh-Ivanov (WMDE) <aleksey.bekh-ivanov@wikimedia.de>
Wed, 21 Dec 2016 15:15:15 +0000 (16:15 +0100)
committerAleksey Bekh-Ivanov (WMDE) <aleksey.bekh-ivanov@wikimedia.de>
Tue, 31 Jan 2017 18:57:51 +0000 (18:57 +0000)
commit3ca13774e244445c1ef9ca838abad0124d2eade3
tree17f9f2fc0096de13adc5abe9eda775dc0df57353
parentee4b1dd28360f845523da911f4c5e68084ae7e9a
PHPUnit autoload file for PhpStorm

`autoload.ide.php` is PhpUnit entry point for PhpStorm IDE
and other JetBrains IDEs.
This file should be set in `Languages and frameworks > PHP > PhpUnit`
select `Use Composer autoloader` and set `Path to script` to `tests/phpunit/autoload.ide.php`

After that, tests can be run in PhpStorm using Right-click > Run
or `Ctrl + Shift + F10`. Also, tests can be run with debugger.

`autoload.ide.php` basically  does almost the same thing
as `tests/phpunit/phpunit.php`,
except that all code is executed inside some function, so some hacks
needed to make old code to be executed as if it was executed on top
of the execution stack.

PS: Mostly it is copy-paste from `phpunit.php` and `doMaintenance.php`.

Change-Id: Idcee38d149542f747ed52c8c9491c6651a0581d9
tests/phpunit/autoload.ide.php [new file with mode: 0644]