Longman\TelegramBot\Tests\Unit\TelegramTest::testAddCustomCommandsPaths PHP Method

testAddCustomCommandsPaths() public method

    public function testAddCustomCommandsPaths()
    {
        $tg = $this->telegram;
        $this->assertAttributeCount(1, 'commands_paths', $tg);
        $tg->addCommandsPath($this->custom_commands_paths[0]);
        $this->assertAttributeCount(2, 'commands_paths', $tg);
        $tg->addCommandsPath('/invalid/path');
        $this->assertAttributeCount(2, 'commands_paths', $tg);
        $tg->addCommandsPaths([$this->custom_commands_paths[1], $this->custom_commands_paths[2]]);
        $this->assertAttributeCount(4, 'commands_paths', $tg);
        $tg->addCommandsPath($this->custom_commands_paths[0]);
        $this->assertAttributeCount(4, 'commands_paths', $tg);
    }