public function testSupplyCustomHandler() { $handler = new MockHandler(); $bot = new SlackBot($this->url, array('handler' => $handler)); $bot->text("some text")->from("my-test-bot")->toGroup("bot-testing")->send(); $this->assertInstanceOf("lygav\\slackbot\\SlackRequest", $handler->lastRequest()); }