aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/data/testimage-large.jpgbin0 -> 338250 bytes
-rw-r--r--tests/data/testimage.webpbin0 -> 2428 bytes
-rw-r--r--tests/lib/SystemTag/SystemTagManagerTest.php13
3 files changed, 9 insertions, 4 deletions
diff --git a/tests/data/testimage-large.jpg b/tests/data/testimage-large.jpg
new file mode 100644
index 00000000000..7b4df1bdcfc
--- /dev/null
+++ b/tests/data/testimage-large.jpg
Binary files differ
diff --git a/tests/data/testimage.webp b/tests/data/testimage.webp
new file mode 100644
index 00000000000..4d882d047ba
--- /dev/null
+++ b/tests/data/testimage.webp
Binary files differ
diff --git a/tests/lib/SystemTag/SystemTagManagerTest.php b/tests/lib/SystemTag/SystemTagManagerTest.php
index ef0546dbd88..e261a68aaf7 100644
--- a/tests/lib/SystemTag/SystemTagManagerTest.php
+++ b/tests/lib/SystemTag/SystemTagManagerTest.php
@@ -259,6 +259,11 @@ class SystemTagManagerTest extends TestCase {
$this->tagManager->createTag($name, $userVisible, $userAssignable);
}
+ public function testCreateOverlongName() {
+ $tag = $this->tagManager->createTag('Zona circundante do Palácio Nacional da Ajuda (Jardim das Damas, Salão de Física, Torre Sineira, Paço Velho e Jardim Botânico)', true, true);
+ $this->assertSame('Zona circundante do Palácio Nacional da Ajuda (Jardim das Damas', $tag->getName()); // 63 characters but 64 bytes due to "á"
+ }
+
/**
* @dataProvider oneTagMultipleFlagsProvider
*/
@@ -281,14 +286,14 @@ class SystemTagManagerTest extends TestCase {
$this->assertSameTag($tag2, $tagList[$tag2->getId()]);
}
-
+
public function testGetNonExistingTag() {
$this->expectException(\OCP\SystemTag\TagNotFoundException::class);
$this->tagManager->getTag('nonexist', false, false);
}
-
+
public function testGetNonExistingTagsById() {
$this->expectException(\OCP\SystemTag\TagNotFoundException::class);
@@ -296,7 +301,7 @@ class SystemTagManagerTest extends TestCase {
$this->tagManager->getTagsByIds([$tag1->getId(), 100, 101]);
}
-
+
public function testGetInvalidTagIdFormat() {
$this->expectException(\InvalidArgumentException::class);
@@ -391,7 +396,7 @@ class SystemTagManagerTest extends TestCase {
$this->assertEmpty($this->tagManager->getAllTags());
}
-
+
public function testDeleteNonExistingTag() {
$this->expectException(\OCP\SystemTag\TagNotFoundException::class);