404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.145.201.49: ~ $
<?php


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

final class VideoTest 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->getVideoUpdate("12345678");
        $this->getTG()->process($update);
        $this->assertStringContainsString("12545", $this->getTG()->params['text']);        
    }

}






Filemanager

Name Type Size Permission Actions
VideoTest.php File 1.47 KB 0644