Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit e1ccd7c

Browse files
committed
Add tagHandling test
1 parent 3cf120c commit e1ccd7c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/DeepLTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,25 @@ public function testTranslateSuccess()
134134
$this->assertEquals('Hello World', $translatedText);
135135
}
136136

137+
/**
138+
* Test translate() with tag handling success
139+
*
140+
* TEST REQUIRES VALID DEEPL AUTH KEY!!
141+
*/
142+
public function testTranslateTagHandlingSuccess()
143+
{
144+
return;
145+
146+
$authKey = 'INSERT YOUR AUTH KEY HERE';
147+
$englishText = '<strong>text to translate</strong>';
148+
149+
$deepl = new DeepL($authKey);
150+
151+
$translatedText = $deepl->translate($germanText, 'en', 'de', ['xml']);
152+
153+
$this->assertEquals('<strong>Text zu übersetzen</strong>', $translatedText);
154+
}
155+
137156
/**
138157
* Test translate()
139158
*

0 commit comments

Comments
 (0)