UpdateType::MessageCreated->value, 'timestamp' => 1678886400000, 'message' => [ 'timestamp' => 1678886400000, 'body' => ['mid' => 'mid.123', 'seq' => 1, 'text' => 'Hello'], 'recipient' => ['chat_type' => 'dialog', 'user_id' => 123], ], 'user_locale' => 'ru-RU', ]; $update = MessageCreatedUpdate::fromArray($data); $this->assertInstanceOf(MessageCreatedUpdate::class, $update); $this->assertSame(UpdateType::MessageCreated, $update->updateType); $this->assertInstanceOf(Message::class, $update->message); $this->assertSame('ru-RU', $update->userLocale); } }