summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-08-07 14:24:00 +0200
committerAleksander Machniak <alec@alec.pl>2013-08-07 14:24:42 +0200
commit216fdb891a6840269ed0a68fb6194f787af9c2bb (patch)
treebc68fb63e7ce07fc9c9aec9f8096641c1c6e619a /tests
parent17f11330f8effc12f6aeef1c46dec86bd1c2b492 (diff)
Fix base URL resolving on attribute values with no quotes (#1489275)
Diffstat (limited to 'tests')
-rw-r--r--tests/Framework/BaseReplacer.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/Framework/BaseReplacer.php b/tests/Framework/BaseReplacer.php
index e00b9e5eb..44a9604ac 100644
--- a/tests/Framework/BaseReplacer.php
+++ b/tests/Framework/BaseReplacer.php
@@ -17,4 +17,18 @@ class Framework_BaseReplacer extends PHPUnit_Framework_TestCase
$this->assertInstanceOf('rcube_base_replacer', $object, "Class constructor");
}
+
+ /**
+ * Test replace()
+ */
+ function test_replace()
+ {
+ $base = 'http://thisshouldntbetheurl.bob.com/';
+ $html = '<A href=http://shouldbethislink.com>Test URL</A>';
+
+ $replacer = new rcube_base_replacer($base);
+ $response = $replacer->replace($html);
+
+ $this->assertSame('<A href="http://shouldbethislink.com">Test URL</A>', $response);
+ }
}