PMCORE-598-A
This commit is contained in:
@@ -8,6 +8,7 @@ use Google_Client;
|
||||
use Google_Service_Gmail_Message;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use PHPMailerOAuth;
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\GmailOAuth\GmailOAuth;
|
||||
use RBAC;
|
||||
use Tests\TestCase;
|
||||
@@ -330,4 +331,22 @@ class GmailOAuthTest extends TestCase
|
||||
}
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* It tests that the message body contains the link to the image
|
||||
*
|
||||
* @test
|
||||
* @covers \ProcessMaker\GmailOAuth\GmailOAuth::getMessageBody()
|
||||
*/
|
||||
public function it_should_tests_the_get_message_body_method()
|
||||
{
|
||||
// Create the GmailOAuth object
|
||||
$gmailOauth = new GmailOAuth();
|
||||
|
||||
// Call the getMessageBody method
|
||||
$res = $gmailOauth->getMessageBody();
|
||||
|
||||
// Assert the result contains the server protocol and host
|
||||
$this->assertRegExp("#" . System::getServerProtocol() . System::getServerHost() . "#", $res);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ class GmailOAuth
|
||||
{
|
||||
$templateTower = new TemplatePower(PATH_TPL . "admin" . PATH_SEP . "email.tpl");
|
||||
$templateTower->prepare();
|
||||
$templateTower->assign("server", System::getServerHostname());
|
||||
$templateTower->assign("server", System::getServerProtocol() . System::getServerHost());
|
||||
$templateTower->assign("date", date("H:i:s"));
|
||||
$templateTower->assign("ver", System::getVersion());
|
||||
$templateTower->assign("engine", G::LoadTranslation("ID_MESS_ENGINE_TYPE_4"));
|
||||
|
||||
Reference in New Issue
Block a user