WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed PHPSpec and I'm wondering how should I get the WordPress environment up and running in order to run my tests;

Essentially, now I can't access anything from the WordPress API as the test file is outside the environment. Does anybody have any idea what should I load in order to make it work?

Thank you.

share|improve this question

You should include /wp-load.php, that will load all of WordPress' functions, etc.

share|improve this answer
Works if I load it in the HelloWorldSpec.php file but I'm still not able to make load it the bootstrap. – c10b10 Jan 27 '12 at 8:30
I'm not sure how you mean...I've never worked with PHPSpec, but it seems like it's a working solution if you can get it to work...you've probably made a typo somewhere I'd guess. – mor7ifer Jan 27 '12 at 13:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.