10

I have the PHP unit and its working fine.Now i want to write the testcases through PHPStorm IDE.To build/run the testcases using PHPStorm it requires config file(phpunit.xml)

so can anyone tell what are the contents of PHPunit.xml. It would be great if you can provide me a sample PHPUnit.xml file and let me know where it should be placed.(if any particular folder structure)

3

2 Answers 2

18

for new users see this post, you can use this command to generate simple phpunit.xml file

./vendor/bin/phpunit --generate-configuration
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, after running in terminal your IDE will run a batch job with the following: Bootstrap script, Tests derectory, Source directory and Cahce directory. You can press enter if the default value path is oK or change it in terminal
4

Documentation: http://phpunit.de/manual/current/en/phpunit-book.html#organizing-tests.xml-configuration

Explanation in JetBrains blog: http://blogs.jetbrains.com/webide/2009/12/phpunit-support/

And you can get help from community: http://devnet.jetbrains.net/message/5275424#5275424

1 Comment

Documentation link for phpunit.de, no longer works. Updated to http://phpunit.de/manual/current/en/phpunit-book.html#organizing-tests.xml-configuration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.