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

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