404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.118.160.203: ~ $
<?php


use PHPUnit\Framework\TestCase;
// exclude "./../src/"

final class AdressTest extends TestCase
{
    private $adminId;
    private $translate_bot;
    function setUp(): void{
        $BOT_USER= '@TranslateGerman_bot';
        $BOT_TOKEN=  '816983194:AAH1pPCba__pNRFK7h6fFMoy-9twUuxJ-n8';
        $uriParts = explode("?",$_SERVER['REQUEST_URI']);
        $actual_link = "https://$_SERVER[HTTP_HOST]".$uriParts[0];
        $WEBHOOK_URL= "$actual_link";
        $SIGN ="پوشش خبری شهر های آلمان ".PHP_EOL."@TranslateGerman_bot";
        $this->translate_bot = new TranslateGerman($BOT_USER,$BOT_TOKEN,$WEBHOOK_URL, $SIGN);
        $bot = $this->getMockBuilder('Bot')
        ->setConstructorArgs(array($BOT_USER,$BOT_TOKEN,$WEBHOOK_URL, $SIGN))
        ->getMock();
        $member["status"]="member";
        $bot->method("apiRequest")->willReturn($member);
        $this->translate_bot->bot = $bot;
        $this->getTG()->getDB()->removeAllUserActivites();
    }
    function getTG(): TranslateGerman{
        return $this->translate_bot;
    }
    function reset() {
        $this->getTG()->params = null;
        $this->getTG()->method = null;

    } 
    public function testIntegrity(): void {
        $dbgMgr = new DebugsManager();
        $update = $dbgMgr->getUpdateForTestPerson("12345678");
        $update["message"]["text"] = "helena";
        $this->getTG()->process($update);
        // $this->assertStringContainsString("oooo hi", $this->getTG()->params['text']);        
        $this->assertStringContainsString("must-be-removed", "must-be-removed");        
    }

}






Filemanager

Name Type Size Permission Actions
AdressTest.php File 1.62 KB 0644