|
|
@@ -30,7 +30,7 @@ class HipChatHandlerTest extends TestCase
|
|
|
fseek($this->res, 0);
|
|
|
$content = fread($this->res, 1024);
|
|
|
|
|
|
- $this->assertRegexp('/POST \/v1\/rooms\/message\?format=json&auth_token=.* HTTP\/1.1\\r\\nHost: api.hipchat.com\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content);
|
|
|
+ $this->assertRegexp('/POST \/v2\/room\/room1\/notification\?auth_token=.* HTTP\/1.1\\r\\nHost: api.hipchat.com\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content);
|
|
|
|
|
|
return $content;
|
|
|
}
|
|
|
@@ -42,7 +42,7 @@ class HipChatHandlerTest extends TestCase
|
|
|
fseek($this->res, 0);
|
|
|
$content = fread($this->res, 1024);
|
|
|
|
|
|
- $this->assertRegexp('/POST \/v1\/rooms\/message\?format=json&auth_token=.* HTTP\/1.1\\r\\nHost: hipchat.foo.bar\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content);
|
|
|
+ $this->assertRegexp('/POST \/v2\/room\/room1\/notification\?auth_token=.* HTTP\/1.1\\r\\nHost: hipchat.foo.bar\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content);
|
|
|
|
|
|
return $content;
|
|
|
}
|
|
|
@@ -52,7 +52,7 @@ class HipChatHandlerTest extends TestCase
|
|
|
*/
|
|
|
public function testWriteContent($content)
|
|
|
{
|
|
|
- $this->assertRegexp('/from=Monolog&room_id=room1¬ify=0&message=test1&message_format=text&color=red$/', $content);
|
|
|
+ $this->assertRegexp('/from=Monolog¬ify=0&message=test1&message_format=text&color=red$/', $content);
|
|
|
}
|
|
|
|
|
|
public function testWriteWithComplexMessage()
|