summaryrefslogtreecommitdiffstats
path: root/PHPMailerRpmTest.php
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-11-15 18:52:55 +0100
committerRemi Collet <remi@remirepo.net>2017-11-15 18:52:55 +0100
commit8ba20caa351c537ad6b3a332bf604a80bdacf3f4 (patch)
treeece5fd6ec0b0fe1c3cbeb5f79ea39afedfd20313 /PHPMailerRpmTest.php
New package
Diffstat (limited to 'PHPMailerRpmTest.php')
-rw-r--r--PHPMailerRpmTest.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/PHPMailerRpmTest.php b/PHPMailerRpmTest.php
new file mode 100644
index 0000000..1a4c903
--- /dev/null
+++ b/PHPMailerRpmTest.php
@@ -0,0 +1,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");
+ }
+}