mirror of
https://github.com/BushlanovDev/max-bot-api-client-php.git
synced 2026-10-08 12:58:34 +00:00
Added ChatButton & ReplyButtons
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace BushlanovDev\MaxMessengerBot\Tests\Models\Attachments\Buttons\Reply;
|
||||
|
||||
use BushlanovDev\MaxMessengerBot\Models\Attachments\Buttons\Reply\SendGeoLocationButton;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
#[CoversClass(SendGeoLocationButton::class)]
|
||||
final class SendGeoLocationButtonTest extends TestCase
|
||||
{
|
||||
#[Test]
|
||||
public function toArrayWithDefaultQuick(): void
|
||||
{
|
||||
$button = new SendGeoLocationButton('Share Location');
|
||||
|
||||
$expected = [
|
||||
'type' => 'user_geo_location',
|
||||
'text' => 'Share Location',
|
||||
'quick' => false,
|
||||
];
|
||||
|
||||
$this->assertEquals($expected, $button->toArray());
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function toArrayWithQuickTrue(): void
|
||||
{
|
||||
$button = new SendGeoLocationButton('Quick Share', true);
|
||||
|
||||
$expected = [
|
||||
'type' => 'user_geo_location',
|
||||
'text' => 'Quick Share',
|
||||
'quick' => true,
|
||||
];
|
||||
|
||||
$this->assertEquals($expected, $button->toArray());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user