Skip to content

Commit

Permalink
Fixing log files to directories a webserver doesn't always have write…
Browse files Browse the repository at this point in the history
… access too.
  • Loading branch information
markstory committed Sep 1, 2011
1 parent 41b22c5 commit 957a8d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
Expand Up @@ -687,18 +687,18 @@ public function testSendWithLog() {
$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);
Expand Down

0 comments on commit 957a8d5

Please sign in to comment.