aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/includes/FeedutilsTest.php (renamed from tests/unit/includes/FeedutilsText.php)9
-rw-r--r--tests/unit/includes/LanguageTest.php5
2 files changed, 9 insertions, 5 deletions
diff --git a/tests/unit/includes/FeedutilsText.php b/tests/unit/includes/FeedutilsTest.php
index 932a1b3a1..d27df4939 100644
--- a/tests/unit/includes/FeedutilsText.php
+++ b/tests/unit/includes/FeedutilsTest.php
@@ -24,7 +24,9 @@ class FeedutilsTest extends UnitTestCase {
$b = ['attribs' => ['' => [
'rel' => 'rel_value',
'type' => 'type_value',
- 'href' => 'href_value'
+ 'href' => 'href_value',
+ 'length' => 'length_value',
+ 'title' => 'title_value'
]]];
$blink1 = ['link1' => $b];
$bresult[] = $b['attribs'][''];
@@ -37,6 +39,9 @@ class FeedutilsTest extends UnitTestCase {
//Illegal string offset 'attribs'
}*/
+ /**
+ * @uses ::xmlify
+ */
public function test_atom_author() {
$this->assertEquals('', atom_author('', 'nick', 'name', 'uri', 72, 72, 'png', 'photourl'));
@@ -47,7 +52,7 @@ class FeedutilsTest extends UnitTestCase {
<link rel="photo" type="png" media:width="72" media:height="72" href="http://photourl" />
<link rel="avatar" type="png" media:width="72" media:height="72" href="http://photourl" />
<poco:preferredUsername>nick</poco:preferredUsername>
- <poco:displayName>name<poco:displayName>
+ <poco:displayName>name</poco:displayName>
</tag>';
$this->assertXmlStringEqualsXmlString($a, atom_author('tag', 'nick', 'name', 'uri', 72, 72, 'png', 'http://photourl'));
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.',