I have been reading up on TDD for a little while, and now have a multisite plugin to 'test' it out on..

At this stage I am a little unsure whether the error is within the Unit Tests, my tests, my plugin or my understanding. So a fair few points of failure there!

On activation of the plugin a new site should be created, which happens when executed manually, however when using create_empty_blog in the tests ends up returning a WordPress Database error rather than a integer or 'Name Already taken'.

This is in itself not a terrible problem. However I would like this created blog to be available during the tests as I intend to write another function that will be adding posts into this generated site, so I need create_empty_blog to return an id.

Any suggestions welcome-> https://github.com/socd-io/socd-gallery

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.