Permalink
Browse files

Fix errors found in review.

  • Loading branch information...
1 parent 50ec08f commit 04463c4ee54c2ae2ff96539252f13b711eb81675 @markstory markstory committed Nov 23, 2011
@@ -556,7 +556,7 @@ public function renderAs($controller, $type, $options = array()) {
}
$controller->ext = '.ctp';
- $viewClass = ucfirst($type);
+ $viewClass = Inflector::classify($type);
App::uses($viewClass . 'View', 'View');
if (class_exists($viewClass . 'View')) {
@@ -98,7 +98,7 @@ public function testRenderWithView() {
);
$Controller->set('users', $data);
$View = new XmlView($Controller);
- $output = $View->render('index', 'xml/xml_view');
+ $output = $View->render('index');
$expected = '<?xml version="1.0" encoding="UTF-8"?><users><user>user1</user><user>user2</user></users>';
$this->assertIdentical($expected, str_replace(array("\r", "\n"), '', $output));

0 comments on commit 04463c4

Please sign in to comment.