예제 #1
0
function as_mail($a)
{
    $a["message"] = as_ob_handler($a["message"]);
    return $a;
}
function test_ob_handler($buffer, $should_change_to = null)
{
    global $host, $path;
    test_init("off", $host, $path, null, true);
    $change_to = as_ob_handler($buffer);
    $pass = $change_to === $should_change_to ? true : false;
    pass_fail($pass);
    echo "\t\t\t{$buffer}" . ($change_to ? "\n\t\t\twould be changed to\n\t\t\t{$change_to}" : " would not be changed");
    if (!$pass) {
        echo "\n\t\t\tand it should have been changed to\n\t\t\t{$should_change_to}";
    }
    echo "\n\n";
}