Commit 4a6daf09 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Link.php: code refactored. New implementation should be position independent...

Link.php: code refactored. New implementation should be position independent for the token string. Also some logic changed to be much cleaner. New: NAME_QUESTION_* (not implemented now), FINAL_*, $tokenMapping[], $tokenGiven[]. Removed: varsDefault - directly set in initVars().
parent f2a99aca
This diff is collapsed.
This diff is collapsed.
......@@ -122,15 +122,15 @@ class ReportTest extends AbstractDatabaseTest {
// link, checked
$result = $this->report->process("10.sql = SELECT 'u:http://www.example.com|C' AS _link FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="http://www.example.com" ><img src="typo3conf/ext/qfq/Resources/Public/icons/checked-green.gif" title="green" > </a>', $result);
$this->assertEquals('<a href="http://www.example.com" ><img alt="Checked green" src="typo3conf/ext/qfq/Resources/Public/icons/checked-green.gif" title="green" ></a>', $result);
// linck, checked, text
$result = $this->report->process("10.sql = SELECT 'u:http://www.example.com|C|t:Hello World' AS _link FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="http://www.example.com" ><img src="typo3conf/ext/qfq/Resources/Public/icons/checked-green.gif" title="green" > Hello World</a>', $result);
$this->assertEquals('<a href="http://www.example.com" ><img alt="Checked green" src="typo3conf/ext/qfq/Resources/Public/icons/checked-green.gif" title="green" > Hello World</a>', $result);
// link, checked, text, tooltip
$result = $this->report->process("10.sql = SELECT 'u:http://www.example.com|C|t:Hello World|o:more information' AS _link FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="http://www.example.com" title="more information" ><img src="typo3conf/ext/qfq/Resources/Public/icons/checked-green.gif" title="green" > Hello World</a>', $result);
$this->assertEquals('<a href="http://www.example.com" title="more information" ><img alt="Checked green" src="typo3conf/ext/qfq/Resources/Public/icons/checked-green.gif" title="green" > Hello World</a>', $result);
}
/**
......@@ -171,10 +171,10 @@ class ReportTest extends AbstractDatabaseTest {
// r:0, mailto
$result = $this->report->process("10.sql = SELECT 'm:john.doe@example.com' AS _link FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="mailto:john.doe@example.com" >mailto:john.doe@example.com</a>', $result);
$this->assertEquals('<a href="mailto:john.doe@example.com" class="external" >mailto:john.doe@example.com</a>', $result);
$result = $this->report->process("10.sql = SELECT 'm:john.doe@example.com|e:0' AS _link FROM Person ORDER BY id LIMIT 1");
$this->assertEquals('<a href="mailto:john.doe@example.com" >mailto:john.doe@example.com</a>', $result);
$this->assertEquals('<a href="mailto:john.doe@example.com" class="external" >mailto:john.doe@example.com</a>', $result);
//TODO: enable encryption check
// $result = $this->report->process("10.sql = SELECT 'm:john.doe@example.com|e:1' AS _link FROM Person ORDER BY id LIMIT 1");
......
Supports Markdown
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