Back to index

php5  5.3.10
Public Member Functions
gtCommandLineOptionsTest Class Reference

List of all members.

Public Member Functions

 testNoOption ()
 RuntimeException
 testShortOption ()
 testShortOptionArgument ()
 testInvalidOption ()
 RuntimeException
 testMissingArgument ()
 RuntimeException

Detailed Description

Definition at line 6 of file gtCommandLineOptionsTest.php.


Member Function Documentation

RuntimeException

Definition at line 33 of file gtCommandLineOptionsTest.php.

                                          {
      $clo = new gtCommandLineOptions();
      $clo->parse(array('generate-phpt.php', '-z'));
    }

RuntimeException

Definition at line 41 of file gtCommandLineOptionsTest.php.

                                         {
      $clo = new gtCommandLineOptions();
      $clo->parse(array('generate-phpt.php', '-f'));
    }

RuntimeException

Definition at line 12 of file gtCommandLineOptionsTest.php.

                                   {
      $clo = new gtCommandLineOptions();
      $clo->parse(array('generate-phpt.php'));
    }

Definition at line 17 of file gtCommandLineOptionsTest.php.

                                      {
      $clo = new gtCommandLineOptions();
      $clo->parse(array('generate-phpt.php', '-h'));
      $this->assertTrue($clo->hasOption('h'));
    }

Definition at line 23 of file gtCommandLineOptionsTest.php.

                                              {
      $clo = new gtCommandLineOptions();
      $clo->parse(array('generate-phpt.php', '-f', 'some-function'));
      $this->assertTrue($clo->hasOption('f'));
      $this->assertEquals('some-function', $clo->getOption('f'));
    }

The documentation for this class was generated from the following file: