From 6d5ec2e046f6b407d4f883490699d23c8c05aa9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n?= Date: Mon, 6 Nov 2023 09:18:22 +0100 Subject: [PATCH 1/2] [BUGFIX] Correct `linkText` value in headerLink property --- .../ContentElement/ContentElementWithHeader.typoscript | 1 - 1 file changed, 1 deletion(-) diff --git a/Configuration/TypoScript/ContentElement/ContentElementWithHeader.typoscript b/Configuration/TypoScript/ContentElement/ContentElementWithHeader.typoscript index ccbb58ff..8c8e05ab 100755 --- a/Configuration/TypoScript/ContentElement/ContentElementWithHeader.typoscript +++ b/Configuration/TypoScript/ContentElement/ContentElementWithHeader.typoscript @@ -21,7 +21,6 @@ lib.contentElementWithHeader { } headerLink = TEXT headerLink { - field = header_link htmlSpecialChars = 1 typolink { parameter { From d5b3f932d95f7a78afb315973bc437c210f33692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n?= Date: Tue, 7 Nov 2023 13:55:07 +0000 Subject: [PATCH 2/2] [TASK] Adjust functional tests --- Tests/Functional/ContentTypes/BaseContentTypeTest.php | 4 ++-- Tests/Functional/ContentTypes/BasicListElementTest.php | 2 +- Tests/Functional/ContentTypes/BulletsElementTest.php | 2 +- Tests/Functional/ContentTypes/HeaderElementTest.php | 2 +- Tests/Functional/ContentTypes/ShortcutElementTest.php | 2 +- Tests/Functional/ContentTypes/TableElementTest.php | 2 +- Tests/Functional/ContentTypes/TextElementTest.php | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Tests/Functional/ContentTypes/BaseContentTypeTest.php b/Tests/Functional/ContentTypes/BaseContentTypeTest.php index 4744c701..aa5d025c 100644 --- a/Tests/Functional/ContentTypes/BaseContentTypeTest.php +++ b/Tests/Functional/ContentTypes/BaseContentTypeTest.php @@ -54,12 +54,12 @@ protected function checkHeaderFields($contentElement, $header = '', $subheader = self::assertTrue(isset($contentElementContent['headerLink']), 'headerLink not set'); } - protected function checkHeaderFieldsLink($contentElement, $link, $urlPrefix, $target) + protected function checkHeaderFieldsLink($contentElement, $linkText, $urlPrefix, $target) { $contentElementHeaderFieldsLink = $contentElement['content']['headerLink']; self::assertIsArray($contentElementHeaderFieldsLink, 'headerLink not an array'); - self::assertEquals($link, $contentElementHeaderFieldsLink['linkText'], 'link mismatch'); + self::assertEquals($linkText, $contentElementHeaderFieldsLink['linkText'], 'linkText mismatch'); self::assertStringStartsWith($urlPrefix, $contentElementHeaderFieldsLink['href'], 'url mismatch'); self::assertEquals($target, $contentElementHeaderFieldsLink['target'], 'target mismatch'); } diff --git a/Tests/Functional/ContentTypes/BasicListElementTest.php b/Tests/Functional/ContentTypes/BasicListElementTest.php index 6a6d64c8..162f0b4f 100644 --- a/Tests/Functional/ContentTypes/BasicListElementTest.php +++ b/Tests/Functional/ContentTypes/BasicListElementTest.php @@ -30,7 +30,7 @@ public function testBasicListContentElement() $this->checkDefaultContentFields($contentElement, 6, 1, 'BasicList', 0); $this->checkAppearanceFields($contentElement, 'layout-1', 'Frame', 'SpaceBefore', 'SpaceAfter'); $this->checkHeaderFields($contentElement, 'Header', 'SubHeader', 1, 2); - $this->checkHeaderFieldsLink($contentElement, 't3://page?uid=2 _blank LinkClass LinkTitle parameter=999', '/page1?parameter=999&cHash=', '_blank'); + $this->checkHeaderFieldsLink($contentElement, 'Page 1', '/page1?parameter=999&cHash=', '_blank'); self::assertFalse(isset($contentElement['content']['bodytext'])); } } diff --git a/Tests/Functional/ContentTypes/BulletsElementTest.php b/Tests/Functional/ContentTypes/BulletsElementTest.php index 82daeb19..98342110 100644 --- a/Tests/Functional/ContentTypes/BulletsElementTest.php +++ b/Tests/Functional/ContentTypes/BulletsElementTest.php @@ -32,7 +32,7 @@ public function testBulletsContentElement() $this->checkDefaultContentFields($contentElement, 8, 1, 'bullets', 0); $this->checkAppearanceFields($contentElement, 'layout-1', 'Frame', 'SpaceBefore', 'SpaceAfter'); $this->checkHeaderFields($contentElement, 'Header', 'SubHeader', 1, 2); - $this->checkHeaderFieldsLink($contentElement, 't3://page?uid=2 _blank LinkClass LinkTitle parameter=999', '/page1?parameter=999&cHash=', '_blank'); + $this->checkHeaderFieldsLink($contentElement, 'Page 1', '/page1?parameter=999&cHash=', '_blank'); self::assertEquals(1, $contentElement['content']['bulletsType']); self::assertTrue(is_array($contentElement['content']['bodytext'])); diff --git a/Tests/Functional/ContentTypes/HeaderElementTest.php b/Tests/Functional/ContentTypes/HeaderElementTest.php index 258a9e38..cf2bc75b 100644 --- a/Tests/Functional/ContentTypes/HeaderElementTest.php +++ b/Tests/Functional/ContentTypes/HeaderElementTest.php @@ -30,6 +30,6 @@ public function testHeaderContentElement() $this->checkDefaultContentFields($contentElement, 3, 1, 'header', 0); $this->checkAppearanceFields($contentElement, 'layout-1', 'Frame', 'SpaceBefore', 'SpaceAfter'); $this->checkHeaderFields($contentElement, 'Header', 'SubHeader', 1, 2); - $this->checkHeaderFieldsLink($contentElement, 't3://page?uid=2 _blank LinkClass LinkTitle parameter=999', '/page1?parameter=999&cHash=', '_blank'); + $this->checkHeaderFieldsLink($contentElement, 'Page 1', '/page1?parameter=999&cHash=', '_blank'); } } diff --git a/Tests/Functional/ContentTypes/ShortcutElementTest.php b/Tests/Functional/ContentTypes/ShortcutElementTest.php index 856d22d6..1197f237 100644 --- a/Tests/Functional/ContentTypes/ShortcutElementTest.php +++ b/Tests/Functional/ContentTypes/ShortcutElementTest.php @@ -45,7 +45,7 @@ public function testShortcutContentElement() $this->checkDefaultContentFields($contentElement['content']['shortcut'][1], 1, 1, 'text', 0, 'SysCategory1Title,SysCategory2Title'); $this->checkAppearanceFields($contentElement['content']['shortcut'][1], 'layout-1', 'Frame', 'SpaceBefore', 'SpaceAfter'); $this->checkHeaderFields($contentElement['content']['shortcut'][1], 'Header', 'SubHeader', 1, 2); - $this->checkHeaderFieldsLink($contentElement['content']['shortcut'][1], 't3://page?uid=2 _blank LinkClass LinkTitle parameter=999', '/page1?parameter=999&cHash=', '_blank'); + $this->checkHeaderFieldsLink($contentElement['content']['shortcut'][1], 'Page 1', '/page1?parameter=999&cHash=', '_blank'); self::assertStringContainsString('