summaryrefslogtreecommitdiffstats
path: root/PHPMailerRpmTest.php
diff options
context:
space:
mode:
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");
+ }
+}