Skip to content
Permalink
Browse files

Adhering to CakePHP coding standards

  • Loading branch information...
NickBeeuwsaert committed Jun 27, 2014
1 parent f9aa954 commit 6623a8a7f402b9824b1a9aa0ee9c2e3672ab393f
Showing with 9 additions and 3 deletions.
  1. +9 −3 lib/Cake/Test/Case/View/ViewTest.php
@@ -245,20 +245,26 @@ class TestObjectWithoutToString {
* An event listener to test cakePHP events
*/
class TestViewEventListener implements CakeEventListener {
public $beforeRenderViewType;
public $afterRenderViewType;
public function implementedEvents() {
return array(
"View.beforeRender"=>"beforeRender",
"View.afterRender" =>"afterRender",
'View.beforeRender' => 'beforeRender',
'View.afterRender' => 'afterRender',
);
}
public function beforeRender($event) {
$this->beforeRenderViewType = $event->subject()->getCurrentType();
}
public function afterRender($event) {
$this->afterRenderViewType = $event->subject()->getCurrentType();
}
}
/**
* ViewTest class
@@ -835,7 +841,7 @@ public function testElementCache() {
*
* @return void
*/
public function testViewEvent(){
public function testViewEvent() {
$View = new View($this->PostsController);
$View->autoLayout = false;
$listener = new TestViewEventListener();

0 comments on commit 6623a8a

Please sign in to comment.
You can’t perform that action at this time.