public function MimeMailWebTestCase::testUrl in Mime Mail 7
File
- tests/
mimemail.test, line 131
Class
- MimeMailWebTestCase
- Tests functions from the Mime Mail module.
Code
public function testUrl() {
$this
->drupalPost('admin/config/system/mimemail', array(
'mimemail_linkonly' => TRUE,
), t('Save configuration'));
$url = 'public://' . $this
->randomName() . ' ' . $this
->randomName() . '.jpg';
$result = _mimemail_url($url, TRUE);
$expected = str_replace(' ', '%20', file_create_url($url));
$message = 'Stream wrapper converted to web accessible URL for linked image.';
$this
->assertIdentical($result, $expected, $message);
}