blob: 1a4c903a494e50b2155d2cf22537e012c05f2370 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<?php
/**
* PHPMailer - RPM language file tests.
*/
namespace PHPMailer\Test;
use PHPMailer\PHPMailer\PHPMailer;
use PHPUnit\Framework\TestCase;
/**
* Check language files for RPM packaging
*/
final class PHPMailerRpmTest extends TestCase
{
/**
* Holds a PHPMailer instance.
*
* @var PHPMailer
*/
private $Mail;
/**
* Run before each test is started.
*/
protected function setUp()
{
$this->Mail = new PHPMailer();
}
public function testTranslation()
{
$this->Mail->setLanguage();
$tr = $this->Mail->getTranslations();
$this->assertEquals('Message body empty', $tr['empty_message'], "English message");
$this->Mail->setLanguage('fr');
$tr = $this->Mail->getTranslations();
$this->assertEquals('Corps du message vide.', $tr['empty_message'], "French message");
}
}
|