1<?php
2
3/**
4 * Writes a single test case to a file
5 *
6 */
7class gtTestCaseWriter {
8
9  public static function write($name, $string, $type, $count = 0) {
10    if ($type  == 'b') {
11    $fileName = $name."_basic.phpt";
12    }
13
14    if ($type  == 'e') {
15     $fileName = $name."_error.phpt";
16    }
17
18    if ($type  == 'v') {
19      $fileName = $name."_variation".$count.".phpt";
20    }
21
22    $fh = fopen($fileName, 'w');
23    fwrite ($fh, $string);
24    fclose($fh);
25  }
26}
27?>
28