1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 08:42:29 +01:00
Files
archived-php-src/scripts/dev/generate-phpt/src/gtTestCaseWriter.php
2009-05-07 09:21:43 +00:00

27 lines
474 B
PHP

<?php
/**
* Writes a single test case to a file
*
*/
class gtTestCaseWriter {
public static function write($name, $string, $type, $count = 0) {
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);
}
}
?>