24 require_once(dirname(__FILE__) .
'/../common-cli.php');
43 print
"Start unit test for common-cli.php\n";
44 print
"test function cli_logger()\n";
45 $data =
"test for cli log";
47 $file_contents = file_get_contents(
"./cli.log");
48 $this->assertEquals(
"$data\n", $file_contents);
50 $file_contents = file_get_contents(
"./cli.log");
51 $this->assertEquals(
"$data\n$data\n", $file_contents);
53 $file_contents = file_get_contents(
"./cli.log");
54 $this->assertEquals(
"$data\n", $file_contents);
55 print
"unit test for common-cli.php end\n";
63 if (file_exists(
"./cli.log")) {
testcli_logger()
test for cli_logger
cli_logger($handle, $message, $mode='a')
Write/append a message to the log handle passed in.