Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F629304
ReplyToMessageTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
ReplyToMessageTest.php
View Options
<?php
/**
* This file is part of the TelegramBot package.
*
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Longman
\
TelegramBot
\
Tests
\
Unit
;
use
Longman
\
TelegramBot
\
Entities
\
Update
;
/**
* @package TelegramTest
* @author Avtandil Kikabidze <akalongman@gmail.com>
* @copyright Avtandil Kikabidze <akalongman@gmail.com>
* @license http://opensource.org/licenses/mit-license.php The MIT License (MIT)
* @link https://github.com/php-telegram-bot/core
*/
class
ReplyToMessageTest
extends
TestCase
{
public
function
testChatType
(
)
{
$json
=
'{
"update_id":137809335,
"message":{
"message_id":4479,
"from":{"id":123,"first_name":"John","username":"MJohn"},
"chat":{"id":-123,"title":"MyChat","type":"group"},
"date":1449092987,
"reply_to_message":{
"message_id":11,
"from":{"id":121,"first_name":"Myname","username":"mybot"},
"chat":{"id":-123,"title":"MyChat","type":"group"},
"date":1449092984,
"text":"type some text"
},
"text":"some text"
}
}'
;
$update
=
new
Update
(
json_decode
(
$json
,
true
)
,
'mybot'
)
;
$reply_to_message
=
$update
->
getMessage
(
)
->
getReplyToMessage
(
)
;
self
::
assertNull
(
$reply_to_message
->
getReplyToMessage
(
)
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 15, 6:33 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
119832
Default Alt Text
ReplyToMessageTest.php (1 KB)
Attached To
Mode
R123 php-telegram-bot
Attached
Detach File
Event Timeline