Skip to content

Commit

Permalink
Correct phpunit tests because of modifications to TextLinkBusiness.ph…
Browse files Browse the repository at this point in the history
…p to show thumbnail of files

Signed-off-by: CM <c10m9@posteo.de>
  • Loading branch information
CM committed Oct 22, 2024
1 parent d4018ed commit ed9264f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/unit/Service/ColumnTypes/TextLinkBusinessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,25 @@ public function testParseValue() {
'unknown' => 'https://nextcloud.com'
]), $column));
self::assertEquals(json_encode(json_encode([
'thumbnailUrl' => 'https://cloud.nextcloud.com/index.php/core/preview?x=32&y=32&fileId=1',
'icon' => '/index.php/apps/theming/img/core/filetypes/images.svg?v=0a0a0a0a',
'title' => 'https://nextcloud.com',
'value' => 'https://nextcloud.com',
'providerId' => 'url',
])), $this->textLink->parseValue(json_encode([
'thumbnailUrl' => 'https://cloud.nextcloud.com/index.php/core/preview?x=32&y=32&fileId=1',
'icon' => '/index.php/apps/theming/img/core/filetypes/images.svg?v=0a0a0a0a',
'resourceUrl' => 'https://nextcloud.com'
]), $column));
self::assertEquals(json_encode(json_encode([
'thumbnailUrl' => '',
'icon' => '/index.php/apps/theming/img/core/filetypes/application-pdf.svg?v=0a0a0a0a',
'title' => 'https://nextcloud.com',
'value' => 'https://nextcloud.com',
'providerId' => 'url',
])), $this->textLink->parseValue(json_encode([
'thumbnailUrl' => '',
'icon' => '/index.php/apps/theming/img/core/filetypes/application-pdf.svg?v=0a0a0a0a',
'resourceUrl' => 'https://nextcloud.com'
]), $column));
self::assertEquals(json_encode(json_encode([
Expand Down

0 comments on commit ed9264f

Please sign in to comment.