Longman\TelegramBot\Tests\Unit\ChatTest::testChatType PHP Method

testChatType() public method

public testChatType ( )
    public function testChatType()
    {
        $chat = TestHelpers::getFakeChatObject();
        self::assertEquals('private', $chat->getType());
        $chat = TestHelpers::getFakeChatObject(['id' => -123, 'type' => null]);
        self::assertEquals('group', $chat->getType());
        $chat = TestHelpers::getFakeChatObject(['id' => -123, 'type' => 'supergroup']);
        self::assertEquals('supergroup', $chat->getType());
        $chat = TestHelpers::getFakeChatObject(['id' => -123, 'type' => 'channel']);
        self::assertEquals('channel', $chat->getType());
    }