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

Commit 4afaf6f

Browse files
add comments to DeepLTest
1 parent 0d05889 commit 4afaf6f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/DeepLTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44

55
class DeepLTest extends \PHPUnit_Framework_TestCase
66
{
7+
/**
8+
* Get protected method
9+
*
10+
* @param $className
11+
* @param $methodName
12+
*
13+
* @return \ReflectionMethod
14+
*/
715
protected static function getMethod($className, $methodName)
816
{
917
$class = new \ReflectionClass($className);
@@ -13,6 +21,9 @@ protected static function getMethod($className, $methodName)
1321
return $method;
1422
}
1523

24+
/**
25+
* Test checkLanguages()
26+
*/
1627
public function testCheckLanguages()
1728
{
1829
$authKey = '123456';
@@ -25,6 +36,9 @@ public function testCheckLanguages()
2536
$this->assertTrue($return);
2637
}
2738

39+
/**
40+
* Test checkLanguages() with exception for source language
41+
*/
2842
public function testCheckLanguagesSourceLanguageException()
2943
{
3044
$authKey = '123456';
@@ -37,6 +51,9 @@ public function testCheckLanguagesSourceLanguageException()
3751
$checkLanguages->invokeArgs($deepl, array('fo', 'en'));
3852
}
3953

54+
/**
55+
* Test checkLanguages() with exception for destination language
56+
*/
4057
public function testCheckLanguagesDestinationLanguageException()
4158
{
4259
$authKey = '123456';
@@ -49,6 +66,9 @@ public function testCheckLanguagesDestinationLanguageException()
4966
$checkLanguages->invokeArgs($deepl, array('de', 'fo'));
5067
}
5168

69+
/**
70+
* Test buildUrl()
71+
*/
5272
public function testBuildUrl()
5373
{
5474
$expectedString = 'https://api.deepl.com/v1/translate?auth_key=123456&text=Hallo%20Welt&source_lang=de&target_lang=en';

0 commit comments

Comments
 (0)