Skip to content

Commit

Permalink
Add test for magic getter, setter.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Aug 16, 2015
1 parent 60520dc commit f17612e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/TestCase/View/ViewTest.php
Expand Up @@ -1890,4 +1890,22 @@ public function testHelpers()
$result = $this->View->helpers();
$this->assertSame($result, $this->View->helpers());
}

/**
* Test magic getter and setter for removed properties.
*
* @return void
*/
public function testMagicGetterSetter()
{
$View = $this->View;

$View->view = 'myview';
$this->assertEquals('myview', $View->template());
$this->assertEquals('myview', $View->view);

$View->viewPath = 'mypath';
$this->assertEquals('mypath', $View->templatePath());
$this->assertEquals('mypath', $View->templatePath);
}
}

0 comments on commit f17612e

Please sign in to comment.