@@ -106,7 +106,7 @@ public function testBuildUrl()
106
106
{
107
107
$ authKey = '123456 ' ;
108
108
109
- $ expectedString = 'https://api.deepl.com/v1 /translate? ' . http_build_query (array (
109
+ $ expectedString = 'https://api.deepl.com/v2 /translate? ' . http_build_query (array (
110
110
'auth_key ' => $ authKey ,
111
111
'source_lang ' => 'de ' ,
112
112
'target_lang ' => 'en ' ,
@@ -128,7 +128,7 @@ public function testBuildUrl()
128
128
public function testBuildUrlWithTags ()
129
129
{
130
130
$ authKey = '123456 ' ;
131
- $ expectedString = 'https://api.deepl.com/v1 /translate? ' . http_build_query (array (
131
+ $ expectedString = 'https://api.deepl.com/v2 /translate? ' . http_build_query (array (
132
132
'auth_key ' => $ authKey ,
133
133
'source_lang ' => 'de ' ,
134
134
'target_lang ' => 'en ' ,
@@ -164,7 +164,7 @@ public function testBuildBody()
164
164
}
165
165
166
166
/**
167
- * Test translate() success
167
+ * Test translate() success with v2 API
168
168
*
169
169
* TEST REQUIRES VALID DEEPL AUTH KEY!!
170
170
*/
@@ -185,17 +185,17 @@ public function testTranslateSuccess()
185
185
}
186
186
187
187
/**
188
- * Test translate() success with v2 API
188
+ * Test translate() success with v1 API
189
189
*
190
190
* TEST REQUIRES VALID DEEPL AUTH KEY!!
191
191
*/
192
- public function testTranslateV2Success ()
192
+ public function testTranslateV1Success ()
193
193
{
194
194
if (self ::$ authKey === false ) {
195
195
$ this ->markTestSkipped ('DeepL Auth Key (DEEPL_AUTH_KEY) is not configured. ' );
196
196
}
197
197
198
- $ deepl = new DeepL (self ::$ authKey , 2 );
198
+ $ deepl = new DeepL (self ::$ authKey , 1 );
199
199
200
200
$ germanText = 'Hallo Welt ' ;
201
201
$ expectedText = 'Hello World ' ;
0 commit comments