PHPUnit Test Template file modification

Hello,

I would like to modify template of PHPUnit test file. Each time I uses right click, "New->PHPUnit" I enter class name that I want to test. PhpStorm does the rest -  creates a file and writes a class code that extends PHPUnit base class. My problem is that all the time I need to provide: "use my/company/namespace/classname/etc/;" manualy - in fact I have already put it into dialog so it should be available in a tempalte file via some symbol/variable.
2015-03-25_09-59-33.png
Could anyone please tell me if it is possible to get this value in template file somehow - to automate generation of test classes?

Best regards
Arek

3 comments
Comment actions Permalink

Hi there,

Settings | Editor | File and Code Templates | Templates | PHPUnit Test

0
Comment actions Permalink

Hi,

Thanks for answer but this is an editor of templates - I already know it.

Question is: what is a variable name that I should use to have tested class name that I have specified in a dialog (like on previous screenshot).
2015-03-25_14-49-57.png
Best regards
Arek

0
Comment actions Permalink

I see.

Currently such variable does not exist --  when you type your class name (code completion) first time and have auto import enabled .. it will be added to the use list automatically.

https://youtrack.jetbrains.com/issue/WI-24955 -- watch this ticket (star/vote/comment) to get notified on progress.

0

Please sign in to leave a comment.