Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F625063
CommandTestCase.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
CommandTestCase.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
\
Commands
;
use
Longman
\
TelegramBot
\
Tests
\
Unit
\
TestCase
;
use
Longman
\
TelegramBot
\
Telegram
;
/**
* @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 http://www.github.com/akalongman/php-telegram-bot
*/
class
CommandTestCase
extends
TestCase
{
/**
* @var \Longman\TelegramBot\Telegram
*/
protected
$telegram
;
/**
* @var \Longman\TelegramBot\Commands\Command
*/
protected
$command
;
/**
* setUp
*/
public
function
setUp
(
)
{
$this
->
telegram
=
new
Telegram
(
'apikey'
,
'testbot'
)
;
$this
->
telegram
->
addCommandsPath
(
BASE_COMMANDS_PATH
.
'/UserCommands'
)
;
$this
->
telegram
->
getCommandsList
(
)
;
}
/**
* Make sure the version number is in the format x.x.x, x.x or x
*/
public
function
testVersionNumberFormat
(
)
{
$this
->
assertRegExp
(
'/^(\d+\\.)?(\d+\\.)?(\d+)$/'
,
$this
->
command
->
getVersion
(
)
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 14, 11:01 PM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
144258
Default Alt Text
CommandTestCase.php (1 KB)
Attached To
Mode
R123 php-telegram-bot
Attached
Detach File
Event Timeline