Browse Source

testing the verifyRequiredArgumner : add more test

Antione LUCAS 11 years ago
parent
commit
1a4053df8f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tests/Zend/Console/GetoptTest.php

+ 4 - 0
tests/Zend/Console/GetoptTest.php

@@ -284,6 +284,10 @@ class Zend_Console_GetoptTest extends PHPUnit_Framework_TestCase
             
             $this->assertEquals( 'Option "a" requires a parameter.' , $e->getMessage() );
         }        
+        
+        $opts->addArguments( array( "-a", "apple") );
+        $opts->parse();
+        $opts->checkRequiredArguments();//-> no Exception here
     }
     
     public function testEmptyRequiredOption(){