Set test bot name to "testbot" and it's API key to "apikey".

parent 764633a9
......@@ -51,11 +51,11 @@ class CommandTest extends TestCase
public function setUp()
{
//Default command object
$this->telegram = new Telegram('apikey', 'botname');
$this->telegram = new Telegram('apikey', 'testbot');
$this->command_stub = $this->getMockForAbstractClass($this->command_namespace, [$this->telegram]);
//Create separate command object that contain a command config
$this->telegram_with_config = new Telegram('apikey', 'botname');
$this->telegram_with_config = new Telegram('apikey', 'testbot');
$this->telegram_with_config->setCommandConfig('command_name', ['config_key' => 'config_value']);
$this->command_stub_with_config = $this->getMockBuilder($this->command_namespace)
->disableOriginalConstructor()
......
......@@ -37,7 +37,7 @@ class CommandTestCase extends TestCase
*/
public function setUp()
{
$this->telegram = new Telegram('apikey', 'botname');
$this->telegram = new Telegram('apikey', 'testbot');
$this->telegram->addCommandsPath(BASE_COMMANDS_PATH . '/UserCommands');
$this->telegram->getCommandsList();
}
......
......@@ -47,7 +47,7 @@ class HelpCommandTest extends CommandTestCase
->getResult()
->getText();
$this->assertContains(
"botname v. " . $this->telegram->getVersion() . "\n\nCommands List:",
'testbot v. ' . $this->telegram->getVersion() . "\n\nCommands List:",
$text
);
}
......
......@@ -40,7 +40,7 @@ class ConversationTest extends TestCase
'password' => PHPUNIT_DB_PASS,
];
$this->telegram = new Telegram('testapikey', 'testbotname');
$this->telegram = new Telegram('apikey', 'testbot');
$this->telegram->enableMySql($credentials);
//Make sure we start with an empty DB for each test.
......
......@@ -40,7 +40,7 @@ class TelegramTest extends TestCase
*/
protected function setUp()
{
$this->telegram = new Telegram('testapikey', 'testbotname');
$this->telegram = new Telegram('apikey', 'testbot');
// Create a few custom commands paths.
foreach ($this->custom_commands_paths as $custom_path) {
......@@ -64,7 +64,7 @@ class TelegramTest extends TestCase
*/
public function testNewInstanceWithoutApiKeyParam()
{
new Telegram(null, 'testbotname');
new Telegram(null, 'testbot');
}
/**
......@@ -72,17 +72,17 @@ class TelegramTest extends TestCase
*/
public function testNewInstanceWithoutBotNameParam()
{
new Telegram('testapikey', null);
new Telegram('apikey', null);
}
public function testGetApiKey()
{
$this->assertEquals('testapikey', $this->telegram->getApiKey());
$this->assertEquals('apikey', $this->telegram->getApiKey());
}
public function testGetBotName()
{
$this->assertEquals('testbotname', $this->telegram->getBotName());
$this->assertEquals('testbot', $this->telegram->getBotName());
}
public function testEnableAdmins()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment