Commit 256a3ddd authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixed phpunit tests.

parent a2975124
Pipeline #1188 passed with stage
in 1 minute and 33 seconds
......@@ -199,11 +199,11 @@ class ReportTest extends AbstractDatabaseTest {
// page with sip (default, without explizit definition)
$result = $this->report->process("10.sql = SELECT 'p:form&r=123&a=hello&type=5&L=3&final=world|t:Person' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&type=5&L=3&s=badcaffee1234" >Person</a>', $result);
$this->assertEquals('<a href="index.php?id=form&type=5&L=3&s=badcaffee1234" >Person</a>', $result);
// page with sip (explizit definition via 's')
$result = $this->report->process("10.sql = SELECT 'p:form&r=123&a=hello&type=5&L=3&final=world|t:Person|s' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&type=5&L=3&s=badcaffee1234" >Person</a>', $result);
$this->assertEquals('<a href="index.php?id=form&type=5&L=3&s=badcaffee1234" >Person</a>', $result);
// page without sip (explizit definition via 's:0')
$result = $this->report->process("10.sql = SELECT 'p:form&r=123&a=hello&type=5&L=3&final=world|t:Person|s:0' AS _page FROM Person ORDER BY id LIMIT 1");
......@@ -211,11 +211,11 @@ class ReportTest extends AbstractDatabaseTest {
// page with sip (explizit definition via 's:1')
$result = $this->report->process("10.sql = SELECT 'p:form&r=123&a=hello&type=5&L=3&final=world|t:Person|s:1' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&type=5&L=3&s=badcaffee1234" >Person</a>', $result);
$this->assertEquals('<a href="index.php?id=form&type=5&L=3&s=badcaffee1234" >Person</a>', $result);
// page with sip (explizit definition via 's:1')
$result = $this->report->process("10.sql = SELECT 'p:form&r=123&a=hello&type=5&L=3&final=world' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&type=5&L=3&s=badcaffee1234" >index.php?id=form&type=5&L=3&s=badcaffee1234</a>', $result);
$this->assertEquals('<a href="index.php?id=form&type=5&L=3&s=badcaffee1234" >index.php?id=form&type=5&L=3&s=badcaffee1234</a>', $result);
}
......@@ -226,31 +226,31 @@ class ReportTest extends AbstractDatabaseTest {
// page & picture
$result = $this->report->process("10.sql = SELECT 'p:form&r=123&a=hello&type=5&L=3&final=world|P:picture.gif' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&type=5&L=3&s=badcaffee1234" ><img alt="picture.gif" src="picture.gif" title="picture.gif" ></a>', $result);
$this->assertEquals('<a href="index.php?id=form&type=5&L=3&s=badcaffee1234" ><img alt="picture.gif" src="picture.gif" title="picture.gif" ></a>', $result);
// page & Edit
$result = $this->report->process("10.sql = SELECT 'p:form&r=123&a=hello&type=5&L=3&final=world|E' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&type=5&L=3&s=badcaffee1234" class="btn btn-default" title="Edit" ><span class="glyphicon glyphicon-pencil" ></span></a>', $result);
$this->assertEquals('<a href="index.php?id=form&type=5&L=3&s=badcaffee1234" class="btn btn-default" title="Edit" ><span class="glyphicon glyphicon-pencil" ></span></a>', $result);
// page & New
$result = $this->report->process("10.sql = SELECT 'p:form&r=123&a=hello&type=5&L=3&final=world|N' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&type=5&L=3&s=badcaffee1234" class="btn btn-default" title="New" ><span class="glyphicon glyphicon-plus" ></span></a>', $result);
$this->assertEquals('<a href="index.php?id=form&type=5&L=3&s=badcaffee1234" class="btn btn-default" title="New" ><span class="glyphicon glyphicon-plus" ></span></a>', $result);
// page & Help
$result = $this->report->process("10.sql = SELECT 'p:form&r=123&a=hello&type=5&L=3&final=world|H' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&type=5&L=3&s=badcaffee1234" class="btn btn-default" title="Help" ><span class="glyphicon glyphicon-question-sign" ></span></a>', $result);
$this->assertEquals('<a href="index.php?id=form&type=5&L=3&s=badcaffee1234" class="btn btn-default" title="Help" ><span class="glyphicon glyphicon-question-sign" ></span></a>', $result);
// page & Information
$result = $this->report->process("10.sql = SELECT 'p:form&r=123&a=hello&type=5&L=3&final=world|I' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&type=5&L=3&s=badcaffee1234" class="btn btn-default" title="Information" ><span class="glyphicon glyphicon-info-sign" ></span></a>', $result);
$this->assertEquals('<a href="index.php?id=form&type=5&L=3&s=badcaffee1234" class="btn btn-default" title="Information" ><span class="glyphicon glyphicon-info-sign" ></span></a>', $result);
// page & Show
$result = $this->report->process("10.sql = SELECT 'p:form&r=123&a=hello&type=5&L=3&final=world|S' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&type=5&L=3&s=badcaffee1234" class="btn btn-default" title="Details" ><span class="glyphicon glyphicon-search" ></span></a>', $result);
$this->assertEquals('<a href="index.php?id=form&type=5&L=3&s=badcaffee1234" class="btn btn-default" title="Details" ><span class="glyphicon glyphicon-search" ></span></a>', $result);
// page & Show & Text
$result = $this->report->process("10.sql = SELECT 'p:form&r=123&a=hello&type=5&L=3&final=world|S|t:Person' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&type=5&L=3&s=badcaffee1234" class="btn btn-default" title="Details" ><span class="glyphicon glyphicon-search" ></span> Person</a>', $result);
$this->assertEquals('<a href="index.php?id=form&type=5&L=3&s=badcaffee1234" class="btn btn-default" title="Details" ><span class="glyphicon glyphicon-search" ></span> Person</a>', $result);
}
/**
......@@ -260,17 +260,17 @@ class ReportTest extends AbstractDatabaseTest {
// page & bullet (green)
$result = $this->report->process("10.sql = SELECT 'p:form|B' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&s=badcaffee1234" ><img alt="Bullet green" src="typo3conf/ext/qfq/Resources/Public/icons/bullet-green.gif" title="green" ></a>', $result);
$this->assertEquals('<a href="index.php?id=form&s=badcaffee1234" ><img alt="Bullet green" src="typo3conf/ext/qfq/Resources/Public/icons/bullet-green.gif" title="green" ></a>', $result);
// page & bullet (green)
$result = $this->report->process("10.sql = SELECT 'p:form|B||t:Person' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="../../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&s=badcaffee1234" ><img alt="Bullet green" src="typo3conf/ext/qfq/Resources/Public/icons/bullet-green.gif" title="green" > Person</a>', $result);
$this->assertEquals('<a href="index.php?id=form&s=badcaffee1234" ><img alt="Bullet green" src="typo3conf/ext/qfq/Resources/Public/icons/bullet-green.gif" title="green" > Person</a>', $result);
$arr = ['blue', 'gray', 'green', 'pink', 'red', 'yellow', 'fake'];
foreach ($arr as $color) {
// page & bullet $color
$result = $this->report->process("10.sql = SELECT 'p:form|B:$color' AS _page FROM Person ORDER BY id LIMIT 1");
$this->assertEquals(" ></a>", $result);
$this->assertEquals("<a href=\"index.php?id=form&s=badcaffee1234\" ><img alt=\"Bullet $color\" src=\"typo3conf/ext/qfq/Resources/Public/icons/bullet-$color.gif\" title=\"$color\" ></a>", $result);
}
}
......@@ -455,14 +455,6 @@ EOF;
$this->assertEquals('<a href="index.php?id=form&type=5&L=3&s=badcaffee1234" title="This is a tooltip" ' . $js . ' >Person</a>', $result);
}
/**
*
*/
public function testReportPageTokenEncryption() {
// TODO: implement
}
/**
*
*/
......@@ -1014,7 +1006,7 @@ EOF;
$this->assertEquals("normal text not found normal text not found ", $result);
$result = $this->report->process("10.sql = SELECT 'normal ', 'hidden' AS _hidden, 'text ' FROM Person ORDER BY id\n10.10.sql = SELECT '{{fakeDontExist:V:::{{EDIT_FORM_PAGE:Y}}}} '");
$this->assertEquals("normal text form normal text form ", $result);
$this->assertEquals("normal text {{EDIT_FORM_PAGE:Y}} normal text {{EDIT_FORM_PAGE:Y}} ", $result);
// store various
......@@ -1068,20 +1060,6 @@ EOF;
}
/**
*
*/
public function testReportPageTokenMail() {
// TODO: implement
}
/**
*
*/
public function testReportPageTokenRender() {
// TODO: implement
}
/**
* @throws CodeException
* @throws DbException
......
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