Skip to content

Commit

Permalink
[BUGFIX] Use chr(10) instead of LF in functional test data provider
Browse files Browse the repository at this point in the history
The functional test splitter script does not define LF and various
other constants, but loads test data providers to find out how
many tests they produce. Those data provider should not use LF,
the splitter throws PHP warnings otherwise.

Resolves: #86552
Releases: master
Change-Id: I89c0748ce595f1f7caee2934f4431b103f60471b
Reviewed-on: https://review.typo3.org/58563
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
lolli42 committed Oct 3, 2018
1 parent bc286ea commit 3de6036
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ protected function initTypoScriptFrontendController(int $uid): TypoScriptFronten
public function generateDataProvider(): array
{
return [
'uid: 1 with canonical_link' => [1, '<link rel="canonical" href="http://localhost/"/>' . LF],
'uid: 2 with canonical_link' => [2, '<link rel="canonical" href="http://localhost/dummy-1-2"/>' . LF],
'uid: 3 with canonical_link AND content_from_pid = 2' => [3, '<link rel="canonical" href="http://localhost/dummy-1-2"/>' . LF],
'uid: 4 without canonical_link AND content_from_pid = 2' => [4, '<link rel="canonical" href="http://localhost/dummy-1-2"/>' . LF],
'uid: 5 without canonical_link AND without content_from_pid set' => [5, '<link rel="canonical" href="http://localhost/dummy-1-2-5"/>' . LF],
'uid: 6 without canonical_link AND content_from_pid = 7 (but target page is deleted)' => [6, '<link rel="canonical" href="http://localhost/dummy-1-2-6"/>' . LF],
'uid: 8 without canonical_link AND content_from_pid = 9 (but target page is hidden)' => [8, '<link rel="canonical" href="http://localhost/dummy-1-2-8"/>' . LF],
'uid: 1 with canonical_link' => [1, '<link rel="canonical" href="http://localhost/"/>' . chr(10)],
'uid: 2 with canonical_link' => [2, '<link rel="canonical" href="http://localhost/dummy-1-2"/>' . chr(10)],
'uid: 3 with canonical_link AND content_from_pid = 2' => [3, '<link rel="canonical" href="http://localhost/dummy-1-2"/>' . chr(10)],
'uid: 4 without canonical_link AND content_from_pid = 2' => [4, '<link rel="canonical" href="http://localhost/dummy-1-2"/>' . chr(10)],
'uid: 5 without canonical_link AND without content_from_pid set' => [5, '<link rel="canonical" href="http://localhost/dummy-1-2-5"/>' . chr(10)],
'uid: 6 without canonical_link AND content_from_pid = 7 (but target page is deleted)' => [6, '<link rel="canonical" href="http://localhost/dummy-1-2-6"/>' . chr(10)],
'uid: 8 without canonical_link AND content_from_pid = 9 (but target page is hidden)' => [8, '<link rel="canonical" href="http://localhost/dummy-1-2-8"/>' . chr(10)],
];
}

Expand Down

0 comments on commit 3de6036

Please sign in to comment.