Fix get_resource_uri() test so it handles properly default_host with prefix and port
This commit is contained in:
parent
a52bf1abe3
commit
c269544adc
1 changed files with 4 additions and 2 deletions
|
@ -97,13 +97,15 @@ class kolab_storage_folder_test extends PHPUnit_Framework_TestCase
|
|||
|
||||
function test_003_get_resource_uri()
|
||||
{
|
||||
$rcmail = rcmail::get_instance();
|
||||
$rcmail = rcmail::get_instance();
|
||||
$foldername = 'Calendar';
|
||||
$uri = parse_url($rcmail->config->get('default_host'));
|
||||
$hostname = $uri['host'];
|
||||
|
||||
$folder = new kolab_storage_folder($foldername, 'event', 'event.default');
|
||||
$this->assertEquals($folder->get_resource_uri(), sprintf('imap://%s@%s/%s',
|
||||
urlencode($rcmail->config->get('tests_username')),
|
||||
$rcmail->config->get('default_host'),
|
||||
$hostname,
|
||||
$foldername
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue