nb/wordpress-tests — pull request #19 by kayue (2012-05-19 14:25:49+00:00)
Title: Bootstrapping WordPress with early hooks.

###### The Problem

As discussed in issue #16, the current wordpress-tests isn't activating plugins in the correct order; plugins should be loaded before theme is activated.

Also, this project cannot used to test WordPress theme because it cannot switch theme when WordPress is initiating.

###### The Solution

By modifying the result returned by `wp_get_active_and_valid_plugins()` and the `TEMPLATEPATH`, `STYLESHEETPATH` constants in `wp-settings.php`, we can activate plugins and theme without touching the database. This can be done by adding filters.

In order to do this, I have made this project able to add early hooks right after the basic part of WordPress is done loading.

###### Usages

User can add early hooks in their `bootstrap.php` file.

```php