Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
1104a8c4
Commit
1104a8c4
authored
May 13, 2021
by
Carsten Rose
Browse files
Fix remaining failed unit tests.
parent
68e934ff
Pipeline
#5235
failed with stages
in 2 minutes and 39 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Tests/Unit/Core/Report/LinkTest.php
View file @
1104a8c4
...
...
@@ -146,12 +146,15 @@ class LinkTest extends TestCase {
$expect
[
'_exportFilename'
]
=
'download.pdf'
;
$result
=
$link
->
fillParameter
(
array
(),
'p:page1|t:text'
,
$rcTokenGiven
,
'd:download.pdf'
);
// unit test behaves different on webwork16/crose/qfq and gitlab runner: so remove problematic BASE_DIR_FAKE
$result
=
str_replace
(
BASE_DIR_FAKE
,
''
,
$result
);
$this
->
assertEquals
(
$expect
,
$result
);
$expect
[
'mode'
]
=
'file'
;
$expect
[
'downloadElements'
]
=
[
'p:page1'
,
'F:file.pdf'
];
$result
=
$link
->
fillParameter
(
array
(),
'p:page1|t:text|d:download.pdf'
,
$rcTokenGiven
,
's|M:file|d|F:file.pdf'
);
// unit test behaves different on webwork16/crose/qfq and gitlab runner: so remove problematic BASE_DIR_FAKE
$result
=
str_replace
(
BASE_DIR_FAKE
,
''
,
$result
);
$this
->
assertEquals
(
$expect
,
$result
);
}
...
...
extension/Tests/Unit/Core/Report/ReportTest.php
View file @
1104a8c4
...
...
@@ -939,6 +939,9 @@ EOF;
// _paged: incl. alert
$result
=
$this
->
report
->
process
(
"10.sql = SELECT 'U:table=Person&r=123' AS _paged FROM Person ORDER BY id LIMIT 1"
);
// $this->assertEquals('<a href="' . Path::urlApi(API_DELETE_PHP) . '?s=badcaffee1234" class="btn btn-default" title="Delete" ' . $js . ' ><span class="glyphicon glyphicon-trash" ></span></a>', $result);
// unit test behaves different on webwork16/crose/qfq and gitlab runner: so remove problematic BASE_DIR_FAKE
$result
=
str_replace
(
BASE_DIR_FAKE
,
''
,
$result
);
$this
->
assertEquals
(
'<a href="'
.
Path
::
appToApi
(
API_DELETE_PHP
)
.
'?s=badcaffee1234" class="btn btn-default" title="Delete" '
.
$js
.
' ><span class="glyphicon glyphicon-trash" ></span></a>'
,
$result
);
// Check das via '_paged' SIP_MODE_ANSWER and SIP_TARGET_URL has been set.
...
...
@@ -995,6 +998,8 @@ EOF;
// _Paged: incl. alert
$result
=
$this
->
report
->
process
(
"10.sql = SELECT 'table=Person&r=123' AS _Paged FROM Person ORDER BY id LIMIT 1"
);
// unit test behaves different on webwork16/crose/qfq and gitlab runner: so remove problematic BASE_DIR_FAKE
$result
=
str_replace
(
BASE_DIR_FAKE
,
''
,
$result
);
$this
->
assertEquals
(
'<a href="'
.
Path
::
appToApi
(
API_DELETE_PHP
)
.
'?s=badcaffee1234" class="btn btn-default" title="Delete" '
.
$js
.
' ><span class="glyphicon glyphicon-trash" ></span></a>'
,
$result
);
// _Paged: other than defaults for the alert.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment