mirror of
https://github.com/BushlanovDev/max-bot-api-client-php.git
synced 2026-08-17 10:32:20 +00:00
24 lines
734 B
PHP
24 lines
734 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace BushlanovDev\MaxMessengerBot\Tests\Models\Attachments;
|
|
|
|
use BushlanovDev\MaxMessengerBot\Models\Attachments\LocationAttachment;
|
|
use PHPUnit\Framework\Attributes\CoversClass;
|
|
use PHPUnit\Framework\Attributes\Test;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
#[CoversClass(LocationAttachment::class)]
|
|
final class LocationAttachmentTest extends TestCase
|
|
{
|
|
#[Test]
|
|
public function canBeCreatedFromArray(): void
|
|
{
|
|
$data = ['type' => 'location', 'latitude' => 55.75, 'longitude' => 37.61];
|
|
$attachment = LocationAttachment::fromArray($data);
|
|
$this->assertInstanceOf(LocationAttachment::class, $attachment);
|
|
$this->assertSame(55.75, $attachment->latitude);
|
|
}
|
|
}
|