OSDN Git Service

test both with and without multisite constants scenarios
authorscribu <mail@scribu.net>
Wed, 17 Jul 2013 00:18:54 +0000 (03:18 +0300)
committerscribu <mail@scribu.net>
Wed, 17 Jul 2013 00:19:48 +0000 (03:19 +0300)
features/core.feature

index cc48e7e..1360d62 100644 (file)
@@ -125,17 +125,32 @@ Feature: Manage WordPress installation
     When I try `wp core install-network --title='test network'`
     Then the return code should be 1
 
-  Scenario: Install multisite from scrath
+  Scenario: Install multisite from scratch
+    Given an empty directory
+    And WP files
+    And wp-config.php
+    And a database
+
+    When I run `wp core multisite-install --url=foobar.org --title=Test --admin_email=admin@example.com --admin_password=1`
+    Then STDOUT should not be empty
+
+    When I run `wp eval 'echo $GLOBALS["current_site"]->domain;'`
+    Then STDOUT should be:
+      """
+      foobar.org
+      """ 
+
+  Scenario: Install multisite from scratch, with MULTISITE already set in wp-config.php
     Given a WP multisite install
     And I run `wp db reset --yes`
 
-    When I run `wp core multisite-install --title=Test --admin_email=admin@example.com --admin_password=1`
+    When I run `wp core multisite-install --url=foobar.org --title=Test --admin_email=admin@example.com --admin_password=1`
     Then STDOUT should not be empty
 
-    When I run `wp eval 'var_export( is_multisite() );'`
+    When I run `wp eval 'echo $GLOBALS["current_site"]->domain;'`
     Then STDOUT should be:
       """
-      true
+      foobar.org
       """ 
 
   Scenario: Custom wp-content directory