Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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. –  m0r7if3r Jan 27 '12 at 13:20
add comment

Your Answer

 
discard

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.