3 Replies Last post: Oct 20, 2010 9:41 PM by Valeria Nikolaenko  
Halil Köklü Newbie 2 posts since
Oct 20, 2010
Currently Being Moderated

Oct 20, 2010 12:29 PM

Bootstrap file in phpunit.xml

Hello,

 

I'm very happy with PhpStorm and I'm gonna buy it when the test period is over. However the only problem I have is getting PHPUnit running. I have worked with the same tests folder (including test classes, phpunit.xml and bootstrap.php) from command line and NetBeans 6.9.x without any problem.

 

PhpStorm does not include the bootstrap file defined in phpunit.xml. F.e.:

 

<phpunit backupGlobals="false"
         bootstrap="tests/bootstrap.php"
         backupStaticAttributes="true"
         colors="false"
         convertErrorsToExceptions="true"
         convertNoticesToExceptions="true"
         convertWarningsToExceptions="true"
         processIsolation="false"
         syntaxCheck="true" />

 

This is a phpunit.xml from a small project. In other projects I have child tags within phpunit (whitelist, logging, testsuite etc.)

 

My environment:

MacOS 10.6.4

PhpStorm 2.0 EAP Build PS-98.108

JDK 1.16.0:20

PHP 5.3.1

PHPUnit 3.4.15

Valeria Nikolaenko Newbie 22 posts since
Aug 4, 2009
Currently Being Moderated
Oct 20, 2010 8:37 PM in response to: Halil Köklü
Re: Bootstrap file in phpunit.xml

Hello, my name is Lera. I am PHPUnit support developer and maintainer.

 

So, you do have your tests, phpunit.xml and bootstrap.xml in the same folder (called tests), right? If no, please describe your file structure.

 

Seems I need some more information to understand the problem. So wouldn't you be so kind to answers to the following questions as well:

 

1) Do you customize working directory in run configuration? If no, then setting bootstrap to bootstrap="bootstrap.php" should do

2) Tell what is your customization for working directory - if any

3) Do tests run fine without bootstrap setting?

 

4) What exact error message do you get in console?

 

It would be also very useful, if you quote the command you use to run these tests from command line (I'm mainly interested what is you working directory in this case - I mean where do you invoke phpunit from).

 

Thank you in advance.

Valeria Nikolaenko Newbie 22 posts since
Aug 4, 2009
Currently Being Moderated
Oct 20, 2010 9:41 PM in response to: Halil Köklü
Re: Bootstrap file in phpunit.xml

Cool!

More Like This

  • Retrieving data ...