mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-04 07:14:02 +01:00
26 lines
650 B
PHP
26 lines
650 B
PHP
<?php
|
|
|
|
/**
|
|
* Test class to test rcmail_string_replacer class
|
|
*
|
|
* @package Tests
|
|
*/
|
|
class Rcmail_RcmailStringReplacer extends PHPUnit\Framework\TestCase
|
|
{
|
|
/**
|
|
* Test for mailto_callback() method
|
|
*/
|
|
function test_mailto_callback()
|
|
{
|
|
$replacer = new rcmail_string_replacer();
|
|
|
|
$result = invokeMethod($replacer, 'mailto_callback', [['email@address.com', 'email@address.com']]);
|
|
|
|
$this->assertMatchesRegularExpression($replacer->pattern, $result);
|
|
|
|
$result = invokeMethod($replacer, 'mailto_callback', [['address.com', 'address.com']]);
|
|
|
|
$this->assertSame('address.com', $result);
|
|
}
|
|
}
|