Skip to content

Commit

Permalink
Fix hardcoded view name and default values.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 18, 2012
1 parent 4e9e1d8 commit 39443e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Network/Email/Email.php
Expand Up @@ -182,7 +182,7 @@ class Email {
*
* @var string
*/
protected $_viewRender = 'View';
protected $_viewRender = 'Cake\View\View';

/**
* Vars to sent to render
Expand Down Expand Up @@ -1179,7 +1179,7 @@ public function reset() {
$this->_headers = array();
$this->_layout = 'default';
$this->_template = '';
$this->_viewRender = 'View';
$this->_viewRender = 'Cake\View\View';
$this->_viewVars = array();
$this->_theme = null;
$this->_helpers = array('Html');
Expand Down
8 changes: 4 additions & 4 deletions lib/Cake/Test/TestCase/Network/Email/EmailTest.php
Expand Up @@ -1530,13 +1530,13 @@ public function testConstructWithConfigString() {
*/
public function testViewRender() {
$result = $this->CakeEmail->viewRender();
$this->assertEquals('View', $result);
$this->assertEquals('Cake\View\View', $result);

$result = $this->CakeEmail->viewRender('Theme');
$this->assertInstanceOf('CakeEmail', $result);
$result = $this->CakeEmail->viewRender('Cake\View\ThemeView');
$this->assertInstanceOf('Cake\Network\Email\Email', $result);

$result = $this->CakeEmail->viewRender();
$this->assertEquals('Theme', $result);
$this->assertEquals('Cake\View\ThemeView', $result);
}

/**
Expand Down

0 comments on commit 39443e3

Please sign in to comment.