Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3318895
BaseReplacer.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
766 B
Referenced Files
None
Subscribers
None
BaseReplacer.php
View Options
<?php
/**
* Test class to test rcube_base_replacer class
*
* @package Tests
*/
class
Framework_BaseReplacer
extends
PHPUnit_Framework_TestCase
{
/**
* Class constructor
*/
function
test_class
()
{
$object
=
new
rcube_base_replacer
(
'test'
);
$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
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Apr 9, 5:47 PM (20 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
463030
Default Alt Text
BaseReplacer.php (766 B)
Attached To
Mode
R3 roundcubemail
Attached
Detach File
Event Timeline
Log In to Comment