mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adhering to CakePHP coding standards
This commit is contained in:
parent
f9aa954562
commit
6623a8a7f4
1 changed files with 9 additions and 3 deletions
|
@ -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 @@ class ViewTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testViewEvent(){
|
||||
public function testViewEvent() {
|
||||
$View = new View($this->PostsController);
|
||||
$View->autoLayout = false;
|
||||
$listener = new TestViewEventListener();
|
||||
|
|
Loading…
Add table
Reference in a new issue