Back to index

php5  5.3.10
Public Member Functions
gtOptionalSectionsTest Class Reference

List of all members.

Public Member Functions

 testBasic ()
 testException ()
 RuntimeException
 testSkip ()
 testSkipKey ()

Detailed Description

Definition at line 6 of file gtOptionalSectionsTest.php.


Member Function Documentation

Definition at line 8 of file gtOptionalSectionsTest.php.

                              {

    $clo = new gtCommandLineOptions();
    $clo->parse(array('generate-phpt.php', '-s', 'skipif:ini'));

    $opt = new gtOptionalSections();
    $opt->setOptions($clo);
    $a = $opt->getOptions();
    $this->assertEquals(true, $a['skipif']);
    $this->assertEquals(true, $a['ini']);
    $this->assertEquals(false, $a['clean']);
  }

RuntimeException

Definition at line 24 of file gtOptionalSectionsTest.php.

                                  {
    $clo = new gtCommandLineOptions();
    $clo->parse(array('generate-phpt.php', '-s', 'blah'));
    $opt = new gtOptionalSections();
    $opt->setOptions($clo);
  }

Definition at line 31 of file gtOptionalSectionsTest.php.

                             {
    $clo = new gtCommandLineOptions();
    $clo->parse(array('generate-phpt.php', '-s', 'skipif', '-x', 'standard'));
    $opt = new gtOptionalSections();
    $opt->setOptions($clo);
    
    $opt = new gtOptionalSections();
    $opt->setOptions($clo);
    
    $this->assertEquals('standard', $opt->getSkipifExt() );

  }

Definition at line 44 of file gtOptionalSectionsTest.php.

                                {
    $clo = new gtCommandLineOptions();
    $clo->parse(array('generate-phpt.php', '-s', 'skipif', '-k', 'win'));
    $opt = new gtOptionalSections();
    $opt->setOptions($clo);
    
    $opt = new gtOptionalSections();
    $opt->setOptions($clo);
    
    $this->assertEquals('win', $opt->getSkipifKey() );

  }

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