Commit 79238d2a authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fix remaining failed unit tests.

parent e0d57d05
Pipeline #5237 passed with stages
in 3 minutes and 50 seconds
......@@ -964,9 +964,13 @@ EOF;
$js = str_replace('modal: true', 'modal: false', $js);
$js = str_replace("type: 'warning'", "type: 'success'", $js);
$result = $this->report->process("10.sql = SELECT 'U:table=Person&r=123|q:Move to trash?:success:yes:no:10:0' 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);
$result = $this->report->process("10.sql = SELECT 'U:table=Person&r=123|q:Move to trash?:success:yes:no:10:0|t:click me' 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> click me</a>', $result);
}
......@@ -1019,14 +1023,20 @@ EOF;
$result = $this->report->process("10.sql = SELECT 'table=Person&r=123|click me||Move to trash?:success:yes:no:10:0' 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> click me</a>', $result);
// Empty string is ok
$result = $this->report->process("10.sql = SELECT '' 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('', $result);
// r=0 is ok
$result = $this->report->process("10.sql = SELECT 'table=Person&r=0' 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('', $result);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment