Skip to content

Commit

Permalink
Fix errors found in review.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Nov 28, 2011
1 parent 50ec08f commit 04463c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/RequestHandlerComponent.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ public function renderAs($controller, $type, $options = array()) {
} }
$controller->ext = '.ctp'; $controller->ext = '.ctp';


$viewClass = ucfirst($type); $viewClass = Inflector::classify($type);
App::uses($viewClass . 'View', 'View'); App::uses($viewClass . 'View', 'View');


if (class_exists($viewClass . 'View')) { if (class_exists($viewClass . 'View')) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/View/XmlViewTest.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function testRenderWithView() {
); );
$Controller->set('users', $data); $Controller->set('users', $data);
$View = new XmlView($Controller); $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>'; $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)); $this->assertIdentical($expected, str_replace(array("\r", "\n"), '', $output));
Expand Down

0 comments on commit 04463c4

Please sign in to comment.