mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing log files to directories a webserver doesn't always have write access too.
This commit is contained in:
parent
41b22c5521
commit
957a8d5c00
1 changed files with 3 additions and 3 deletions
|
@ -687,18 +687,18 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$path = CAKE . 'Test' . DS . 'test_app' . DS . 'tmp' . DS;
|
||||
CakeLog::config('email', array(
|
||||
'engine' => 'FileLog',
|
||||
'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'tmp' . DS
|
||||
'path' => TMP
|
||||
));
|
||||
CakeLog::drop('default');
|
||||
$this->CakeEmail->transport('Debug');
|
||||
$this->CakeEmail->to('me@cakephp.org');
|
||||
$this->CakeEmail->from('cake@cakephp.org');
|
||||
$this->CakeEmail->subject('My title');
|
||||
$this->CakeEmail->config(array('log' => 'emails'));
|
||||
$this->CakeEmail->config(array('log' => 'cake_test_emails'));
|
||||
$result = $this->CakeEmail->send("Logging This");
|
||||
|
||||
App::uses('File', 'Utility');
|
||||
$File = new File(CAKE . 'Test' . DS . 'test_app' . DS . 'tmp' . DS . 'emails.log');
|
||||
$File = new File(TMP . 'cake_test_emails.log');
|
||||
$log = $File->read();
|
||||
$this->assertTrue(strpos($log, $result['headers']) !== false);
|
||||
$this->assertTrue(strpos($log, $result['message']) !== false);
|
||||
|
|
Loading…
Add table
Reference in a new issue