1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Created by PhpStorm. |
4
|
|
|
* Team: jungle |
5
|
|
|
* User: Roma Baranenko |
6
|
|
|
* Contacts: <[email protected]> |
7
|
|
|
* Date: 05.12.17 |
8
|
|
|
* Time: 18:50 |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace TelegramBotAPI\Tests\InlineQueryResult; |
12
|
|
|
|
13
|
|
|
|
14
|
|
|
use PHPUnit\Framework\TestCase; |
15
|
|
|
use TelegramBotAPI\Types\InlineKeyboardMarkup; |
16
|
|
|
use TelegramBotAPI\InputMessageContent\InputMessageContent; |
17
|
|
|
use TelegramBotAPI\InputMessageContent\InputLocationMessageContent; |
18
|
|
|
use TelegramBotAPI\InlineQueryResult\InlineQueryResultCachedMpeg4Gif; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Class InlineQueryResultCachedMpeg4GifTest |
22
|
|
|
* @package TelegramBotAPI\Tests\InlineQueryResult |
23
|
|
|
* @author Roma Baranenko <[email protected]> |
24
|
|
|
*/ |
25
|
|
|
class InlineQueryResultCachedMpeg4GifTest extends TestCase { |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @throws \TelegramBotAPI\Exception\TelegramBotAPIException |
29
|
|
|
*/ |
30
|
|
|
public function testAccessors() { |
31
|
|
|
|
32
|
|
|
$obj = new InlineQueryResultCachedMpeg4Gif(); |
33
|
|
|
|
34
|
|
|
$obj->setId('id'); |
35
|
|
|
$obj->setTitle('title'); |
36
|
|
|
$obj->setCaption('caption'); |
37
|
|
|
$obj->setMpeg4FileId('mpeg4_file_id'); |
38
|
|
|
$obj->setReplyMarkup(new InlineKeyboardMarkup()); |
39
|
|
|
$obj->setInputMessageContent(new InputLocationMessageContent()); |
40
|
|
|
|
41
|
|
|
$this->assertEquals('mpeg4_gif', $obj->getType()); |
42
|
|
|
$this->assertEquals('id', $obj->getId()); |
43
|
|
|
$this->assertEquals('title', $obj->getTitle()); |
44
|
|
|
$this->assertEquals('caption', $obj->getCaption()); |
45
|
|
|
$this->assertEquals('mpeg4_file_id', $obj->getMpeg4FileId()); |
46
|
|
|
|
47
|
|
|
$this->assertInstanceOf(InlineKeyboardMarkup::class, $obj->getReplyMarkup()); |
48
|
|
|
$this->assertInstanceOf(InputMessageContent::class, $obj->getInputMessageContent()); |
49
|
|
|
|
50
|
|
|
$this->assertJson(json_encode($obj)); |
51
|
|
|
} |
52
|
|
|
} |
53
|
|
|
|