Skip to content

Commit

Permalink
Adhering to CakePHP coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
NickBeeuwsaert committed Jun 27, 2014
1 parent f9aa954 commit 6623a8a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/Cake/Test/Case/View/ViewTest.php
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 6623a8a

Please sign in to comment.