assertSame(DialogType::USER, DialogType::from(101374607)); $this->assertSame(DialogType::CHAT, DialogType::from(-101374607)); $this->assertSame(DialogType::CHANNEL_OR_SUPERGROUP, DialogType::from(-1001234567890)); $this->assertSame(DialogType::SECRET_CHAT, DialogType::from(-1999898625393)); $this->assertTrue(DialogType::isUser(1099511627775)); $this->assertTrue(DialogType::isChat(-999_999_999_999)); $this->assertTrue(DialogType::isSupergroupOrChannel(-1997852516352)); $this->assertTrue(DialogType::isSecretChat(-2002147483648)); $this->assertTrue(DialogType::isUser(101374607)); $this->assertTrue(DialogType::isChat(-101374607)); $this->assertTrue(DialogType::isSupergroupOrChannel(-1001234567890)); $this->assertTrue(DialogType::isSecretChat(-1999898625393)); } public function testException1(): void { $this->expectException(AssertionError::class); $this->assertTrue(DialogType::isSecretChat(-2999898625393)); } public function testException2(): void { $this->expectException(AssertionError::class); $this->assertTrue(DialogType::from(0)); } }