diff options
author | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2017-10-25 01:57:18 +0200 |
---|---|---|
committer | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2017-10-29 22:00:06 +0100 |
commit | 8e4c5db766ce23d05b8507991b04fece743147de (patch) | |
tree | 55c89f2c145f47245e7d32380c92256051d6a8f2 /tests/unit/includes/LanguageTest.php | |
parent | fe5f1e4d67d999ed3c6ef78dc4d49f5dd1a93056 (diff) | |
download | volse-hubzilla-8e4c5db766ce23d05b8507991b04fece743147de.tar.gz volse-hubzilla-8e4c5db766ce23d05b8507991b04fece743147de.tar.bz2 volse-hubzilla-8e4c5db766ce23d05b8507991b04fece743147de.zip |
:arrow_up: Update Text_LanguageDetect.
Update from v0.3.0 (2012) to v1.0.0 (2017) which should remove some
warnings and improve PHP7 support.
Using composer to handle this PEAR library now.
Fix a problem in FeedutilsTest.
Diffstat (limited to 'tests/unit/includes/LanguageTest.php')
-rw-r--r-- | tests/unit/includes/LanguageTest.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/unit/includes/LanguageTest.php b/tests/unit/includes/LanguageTest.php index 789dbe80b..8bf9ca766 100644 --- a/tests/unit/includes/LanguageTest.php +++ b/tests/unit/includes/LanguageTest.php @@ -52,7 +52,6 @@ class LanguageTest extends UnitTestCase { // Can not unit test detect_language(), therefore test the used library // only for now to find regressions on library updates. - require_once('library/langdet/Text/LanguageDetect.php'); $l = new Text_LanguageDetect; // return 2-letter ISO 639-1 (en) language code $l->setNameMode(2); @@ -71,8 +70,8 @@ class LanguageTest extends UnitTestCase { ], 'English' => [ 'English is a West Germanic language that was first spoken in early medieval England and is now a global lingua franca.[4][5] Named after the Angles, one of the Germanic tribes that migrated to England, it ultimately derives its name from the Anglia (Angeln) peninsula in the Baltic Sea. It is closely related to the Frisian languages, but its vocabulary has been significantly influenced by other Germanic languages, particularly Norse (a North Germanic language), as well as by Latin and Romance languages, especially French.', - 'da', // nearly impossible to find a wikipedia article which is detected as english - 0.000367 // minimum confidence is checked in detect_language(), but that is not yet unit testable + 'en', + 0.078422 ], 'German' => [ 'Deutschland ist ein Bundesstaat in Mitteleuropa. Er besteht aus 16 Ländern und ist als freiheitlich-demokratischer und sozialer Rechtsstaat verfasst. Die Bundesrepublik Deutschland stellt die jüngste Ausprägung des deutschen Nationalstaates dar. Mit rund 82,8 Millionen Einwohnern (31. Dezember 2016) zählt Deutschland zu den dicht besiedelten Flächenstaaten.', |