mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-22 15:56:58 +01:00
* fix Tests\Browser\TestCase imports * fix remaining imports * fix PHPUnit\Framework\TestCase imports * import GuzzleHttp\Client * fix remaining * "php_unit_method_casing" is not todo * fix "single_line_comment_spacing" * fix 2nd commit done using older fixer
26 lines
651 B
PHP
26 lines
651 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
/**
|
|
* Test class to test rcmail_string_replacer class
|
|
*/
|
|
class Rcmail_RcmailStringReplacer extends TestCase
|
|
{
|
|
/**
|
|
* Test for mailto_callback() method
|
|
*/
|
|
public 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);
|
|
}
|
|
}
|