Fix a few more small issues.

This commit is contained in:
mark_story 2012-03-18 23:25:19 -04:00
parent 12efa3eb70
commit 94b3839b2e
4 changed files with 12 additions and 7 deletions

View file

@ -653,7 +653,7 @@ class AuthComponentTest extends CakeTestCase {
$this->Controller->request['action'] = 'login';
$this->assertFalse($this->Controller->Auth->startup($this->Controller));
$this->Controller->Auth->deny();
$this->Controller->Auth->allow(null);

View file

@ -1338,7 +1338,7 @@ class I18nTest extends CakeTestCase {
Configure::write('Config.language', 'rule_13_mo');
$this->assertRulesThirteen();
}
/**
* testPoRulesThirteen method
*
@ -1427,7 +1427,7 @@ class I18nTest extends CakeTestCase {
Configure::write('Config.language', 'rule_14_mo');
$this->assertRulesFourteen();
}
/**
* testPoRulesFourteen method
*

View file

@ -84,7 +84,7 @@ class JqueryEngineHelperTest extends CakeTestCase {
$this->assertEquals($expected, $result);
$result = $this->Jquery->event('click', '$(this).hide();');
$expected = '$("#myLink").bind("click", function (event) {$(this).hide();'."\n".'return false;});';
$expected = '$("#myLink").bind("click", function (event) {$(this).hide();' . "\n" . 'return false;});';
$this->assertEquals($expected, $result);
}

View file

@ -58,7 +58,7 @@ class PagesController extends AppController {
if (!$count) {
$this->redirect('/');
}
$page = $subpage = $title_for_layout = null;
$page = $subpage = $titleForLayout = null;
if (!empty($path[0])) {
$page = $path[0];
@ -67,9 +67,14 @@ class PagesController extends AppController {
$subpage = $path[1];
}
if (!empty($path[$count - 1])) {
$title_for_layout = Inflector::humanize($path[$count - 1]);
$titleForLayout = Inflector::humanize($path[$count - 1]);
}
$this->set(compact('page', 'subpage', 'title_for_layout'));
$this->set(array(
'page' => $page,
'subpage' => $subpage,
'title_for_layout' => $titleForLayout
));
$this->render(implode('/', $path));
}
}