mirror of
https://github.com/friendica/friendica
synced 2025-04-27 18:30:12 +00:00
Add pear/Text_LanguageDetect to Composer/vendor
- Updated mobiledetectlib to 2.8.26 - Updated PEAR to 1.10.5 - Updated Archive_Tar to 1.4.3 - Updated XML_Util to 1.4.3
This commit is contained in:
parent
93fd189198
commit
7d876aab98
109 changed files with 6517 additions and 243 deletions
72
vendor/pear/text_languagedetect/tests/Text_LanguageDetect_ISO639Test.php
vendored
Normal file
72
vendor/pear/text_languagedetect/tests/Text_LanguageDetect_ISO639Test.php
vendored
Normal file
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
set_include_path(
|
||||
__DIR__ . '/../' . PATH_SEPARATOR . get_include_path()
|
||||
);
|
||||
|
||||
require_once 'Text/LanguageDetect/ISO639.php';
|
||||
|
||||
class Text_LanguageDetect_ISO639Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testNameToCode2()
|
||||
{
|
||||
$this->assertEquals(
|
||||
'de',
|
||||
Text_LanguageDetect_ISO639::nameToCode2('german')
|
||||
);
|
||||
}
|
||||
|
||||
public function testNameToCode2Fail()
|
||||
{
|
||||
$this->assertNull(
|
||||
Text_LanguageDetect_ISO639::nameToCode2('doesnotexist')
|
||||
);
|
||||
}
|
||||
|
||||
public function testNameToCode3()
|
||||
{
|
||||
$this->assertEquals(
|
||||
'fra',
|
||||
Text_LanguageDetect_ISO639::nameToCode3('french')
|
||||
);
|
||||
}
|
||||
|
||||
public function testNameToCode3Fail()
|
||||
{
|
||||
$this->assertNull(
|
||||
Text_LanguageDetect_ISO639::nameToCode3('doesnotexist')
|
||||
);
|
||||
}
|
||||
|
||||
public function testCode2ToName()
|
||||
{
|
||||
$this->assertEquals(
|
||||
'english',
|
||||
Text_LanguageDetect_ISO639::code2ToName('en')
|
||||
);
|
||||
}
|
||||
|
||||
public function testCode2ToNameFail()
|
||||
{
|
||||
$this->assertNull(
|
||||
Text_LanguageDetect_ISO639::code2ToName('nx')
|
||||
);
|
||||
}
|
||||
|
||||
public function testCode3ToName()
|
||||
{
|
||||
$this->assertEquals(
|
||||
'romanian',
|
||||
Text_LanguageDetect_ISO639::code3ToName('rom')
|
||||
);
|
||||
}
|
||||
|
||||
public function testCode3ToNameFail()
|
||||
{
|
||||
$this->assertNull(
|
||||
Text_LanguageDetect_ISO639::code3ToName('nxx')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue