Sfoglia il codice sorgente

testing the verifyRequiredArgumner : add more test

Antione LUCAS 11 anni fa
parent
commit
1a4053df8f
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  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(){