Added MessageButton & ChatAdminPermission::EditLink & alias in ChatAdmin & participants in Chat & first_name in BotPatch

This commit is contained in:
Alex
2025-12-18 19:50:58 +03:00
parent cbb4cbcf0e
commit 3c6da8e8f6
15 changed files with 83 additions and 5 deletions
@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace BushlanovDev\MaxMessengerBot\Tests\Models\Attachments\Buttons\Inline;
use BushlanovDev\MaxMessengerBot\Enums\InlineButtonType;
use BushlanovDev\MaxMessengerBot\Models\Attachments\Buttons\Inline\MessageButton;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;
#[CoversClass(MessageButton::class)]
final class MessageButtonTest extends TestCase
{
#[Test]
public function toArraySerializesCorrectly(): void
{
$button = new MessageButton('Test Button');
$expectedArray = [
'type' => InlineButtonType::Message->value,
'text' => 'Test Button',
];
$resultArray = $button->toArray();
$this->assertSame($expectedArray, $resultArray);
}
}