[Wp-unit-tests] [WordPress Unit Tests] #100: Fix multisite installation and initialization

WordPress Unit Tests noreply at wordpress.org
Sun Jul 1 22:06:34 UTC 2012

#100: Fix multisite installation and initialization
 Reporter:  nacin      |      Owner:
     Type:  defect     |     Status:  new
 Priority:  normal     |  Milestone:  Implement New Test Runner
Component:  Multisite  |   Keywords:
 Relevant reading:
  * https://github.com/nb/wordpress-tests/pull/9
  * https://github.com/nb/wordpress-tests/issues/23

 When running multisite, we should take care to *not* add any more sites.
 In this case, the "empty blog" setup would mean a network with one blog
 with no content. If you need sites for a test, you should use the factory
 I added in [838].

 This means we can essentially drop ms-install.php and the related

 To install a network, we need to not be MULTISITE. (We can be, but it
 complicates things.) But rather than using WP_ALLOW_MULTISITE, we should
 be using something like WP_TESTS_MULTISITE. (In an ideal world, this would
 become `-m` again.)

 To deal with the issues of when to install, we should just use a hash of
 the config file, plus the db_version number. That handles all of the
 issues expressed [https://github.com/nb/wordpress-tests/issues/23 here].

 I'm actually at the point where we should probably always install, mainly
 because during testing and development, you're bound to have code-level
 changes that could conflict with existing DB tables. The install process
 is fast enough, I think, for it to be worth always do it.

Ticket URL: <http://unit-tests.trac.wordpress.org/ticket/100>
WordPress Unit Tests <http://unit-tests.trac.wordpress.org>
My example project

More information about the wp-unit-tests mailing list