Back to index

php5  5.3.10
Static Public Member Functions
gtTestCaseWriter Class Reference

Writes a single test case to a file. More...

List of all members.

Static Public Member Functions

static write ($name, $string, $type, $count=0)

Detailed Description

Writes a single test case to a file.

Definition at line 7 of file gtTestCaseWriter.php.


Member Function Documentation

static gtTestCaseWriter::write ( name,
string,
type,
count = 0 
) [static]

Definition at line 9 of file gtTestCaseWriter.php.

                                                                  {
    if ($type  == 'b') {
    $fileName = $name."_basic.phpt";
    }
    
    if ($type  == 'e') {
     $fileName = $name."_error.phpt";
    }
    
    if ($type  == 'v') {
      $fileName = $name."_variation".$count.".phpt";
    }
    
    $fh = fopen($fileName, 'w');
    fwrite ($fh, $string);
    fclose($fh);
  }

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