OSDN Git Service

add unit test for #633
authorscribu <mail@scribu.net>
Mon, 5 Aug 2013 20:09:15 +0000 (23:09 +0300)
committerscribu <mail@scribu.net>
Mon, 5 Aug 2013 20:22:10 +0000 (23:22 +0300)
It's better to test for the specific bug, when possible.

This reverts commit d6287f7622ec71653ec0d5b4e52a8b4992183e0c.

features/help.feature
tests/test-synopsis.php

index f8ee09c..10626d6 100644 (file)
@@ -20,17 +20,10 @@ Feature: Get help about WP-CLI commands
     And STDERR should not be empty
 
   Scenario: Help for incomplete commands
-    Given a WP install
+    Given an empty directory
 
     When I run `wp core`
     Then STDOUT should contain:
       """
       usage: wp core
       """
-
-    # See https://github.com/wp-cli/wp-cli/issues/633
-    When I run `wp plugin install`
-    Then STDOUT should contain:
-      """
-      usage: wp plugin install
-      """
index 22e7cb9..427e2ab 100644 (file)
@@ -11,7 +11,7 @@ class SynopsisParserTest extends PHPUnit_Framework_TestCase {
        }
 
        function testPositional() {
-               $r = SynopsisParser::parse( '<foo> [<bar>]' );
+               $r = SynopsisParser::parse( '<plugin|zip> [<bar>]' );
 
                $this->assertCount( 2, $r );