[TYPO3-english] TYPO3 6, PhpStorm and unit testing

Philipp Gampe philipp.gampe at typo3.org
Thu Aug 22 20:04:50 CEST 2013


Hi Viktor Livakivskyi,

Viktor Livakivskyi wrote:

> Seems, that I've solved this problem.

Can you report your findings to:
http://wiki.typo3.org/Unit_Testing_TYPO3

> For anyone else, who will face it, here is, what I did. Your local PHPUnit
> configuration must be adjusted a bit: 1. Go to "Run/Debug Configurations"
> view (top menu "Run" -> "Edit Configurations..."). 2. Select your PHPUnit
> configuration (or create one, if you didn't make it yet). 3. Add following
> "Interpreter options": " <absolute path to your
> project>\typo3\cli_dispatch.phpsh phpunit_ide_testrunner". 4. Run and have
> fun :)
> 
> Be aware of these prerequicities:
> 1. You must have working TYPO3 installation in <absolute path to your
> project>. 2. You must have EXT:phpunit installed.
> 3. You must have '_cli_phpunit' BE user created.
> 4. Your test cases must extend
> '"TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase". 5. You need PHP interpreter
> configured for your project ("Project Settings" -> "PHP"). You may use
> original from php.net - no need to use bash script, mentioned in my
> previous post.
> 
> Right now "Run with code coverage" isn't working yet, so I still need
> PHPUnit BE module for that, but if I figure out, how to make it work from
> PhpStorm, I'll add new message here.

Cheers
-- 
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!



More information about the TYPO3-english mailing list