mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Make test case use SERVER_NAME conditionally.
This commit is contained in:
parent
f528bb29ba
commit
591022f182
1 changed files with 2 additions and 1 deletions
|
@ -1119,7 +1119,8 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
$this->CakeEmail->template('image');
|
$this->CakeEmail->template('image');
|
||||||
$this->CakeEmail->emailFormat('html');
|
$this->CakeEmail->emailFormat('html');
|
||||||
|
|
||||||
$expected = '<img src="http://' . env('SERVER_NAME') . '/img/image.gif" alt="cool image" width="100" height="100" />';
|
$server = env('SERVER_NAME') ? env('SERVER_NAME') : 'localhost';
|
||||||
|
$expected = '<img src="http://' . $server . '/img/image.gif" alt="cool image" width="100" height="100" />';
|
||||||
$result = $this->CakeEmail->send();
|
$result = $this->CakeEmail->send();
|
||||||
$this->assertContains($expected, $result['message']);
|
$this->assertContains($expected, $result['message']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue