Esempio n. 1
0
 function test_me()
 {
     $bot = new HonkerBot();
     $user = "******";
     $msg = "Test Message";
     $response = $bot->me($user, $msg);
     $expected = "PRIVMSG {$user} :ACTION {$msg}\n";
     $this->assertEquals($expected, $response);
 }
Esempio n. 2
0
 function test_write()
 {
     $bot = new HonkerBot();
     $handle = fopen("php://memory", "rw+");
     $text = "This is some sample text.";
     $bot->write($handle, $text);
     rewind($handle);
     $result = fread($handle, strlen($text));
     $this->assertEquals($text, $result);
 }