mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Fix testSendRenderWithImage when non running on port 80
This commit is contained in:
parent
f6278488af
commit
6c4ba233ba
1 changed files with 5 additions and 1 deletions
|
@ -1118,8 +1118,12 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$this->CakeEmail->config(array('empty'));
|
||||
$this->CakeEmail->template('image');
|
||||
$this->CakeEmail->emailFormat('html');
|
||||
|
||||
$server = env('SERVER_NAME') ? env('SERVER_NAME') : 'localhost';
|
||||
|
||||
if (env('SERVER_PORT') != 80) {
|
||||
$server .= ':' . env('SERVER_PORT');
|
||||
}
|
||||
|
||||
$expected = '<img src="http://' . $server . '/img/image.gif" alt="cool image" width="100" height="100" />';
|
||||
$result = $this->CakeEmail->send();
|
||||
$this->assertContains($expected, $result['message']);
|
||||
|
|
Loading…
Add table
Reference in a new issue