<?php use PHPUnit\Framework\TestCase; final class EuroTomanTest extends TestCase { 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; } /** * @group failing */ public function testDate(): void { $dbgMgr = new DebugsManager(); $debugUserID = 123456; $update = $dbgMgr->getUpdateForTestPerson($debugUserID); $update["message"]["text"]="17 eur"; $this->getTG()->process($update); $this->assertStringContainsString("euro", $this->getTG()->params["text"]); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
adresses | Folder | 0755 |
|
|
advertise | Folder | 0755 |
|
|
database | Folder | 0755 |
|
|
drive-german | Folder | 0755 |
|
|
german | Folder | 0755 |
|
|
invited | Folder | 0755 |
|
|
ocr | Folder | 0755 |
|
|
patreon | Folder | 0755 |
|
|
speech | Folder | 0755 |
|
|
swedish | Folder | 0755 |
|
|
tamasbabot | Folder | 0755 |
|
|
videos | Folder | 0755 |
|
|
DateConverterIntentTest.php | File | 11.98 KB | 0755 |
|
EuroTomanIntentTest.php | File | 2.4 KB | 0755 |
|
EuroTomanTest.php | File | 1.44 KB | 0755 |
|
GeneralTest.php | File | 1.79 KB | 0755 |
|
verbose.php | File | 20 B | 0755 |
|