mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Fix typos & strict errors.
This commit is contained in:
parent
3ba2db738f
commit
869d556d07
3 changed files with 7 additions and 7 deletions
|
@ -1195,7 +1195,7 @@ class DispatcherTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testDispatcherFilterSuscriber() {
|
public function testDispatcherFilterSubscriber() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
|
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
|
||||||
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
|
|
|
@ -20,13 +20,13 @@ App::uses('DispatcherFilter', 'Routing');
|
||||||
|
|
||||||
class Test2DispatcherFilter extends DispatcherFilter {
|
class Test2DispatcherFilter extends DispatcherFilter {
|
||||||
|
|
||||||
public function beforeDispatch($event) {
|
public function beforeDispatch(CakeEvent $event) {
|
||||||
$event->data['response']->statusCode(500);
|
$event->data['response']->statusCode(500);
|
||||||
$event->stopPropagation();
|
$event->stopPropagation();
|
||||||
return $event->data['response'];
|
return $event->data['response'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterDispatch($event) {
|
public function afterDispatch(CakeEvent $event) {
|
||||||
$event->data['response']->statusCode(200);
|
$event->data['response']->statusCode(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@ App::uses('DispatcherFilter', 'Routing');
|
||||||
|
|
||||||
class TestDispatcherFilter extends DispatcherFilter {
|
class TestDispatcherFilter extends DispatcherFilter {
|
||||||
|
|
||||||
public function beforeDispatch($event) {
|
public function beforeDispatch(CakeEvent $event) {
|
||||||
$event->data['request']->params['altered'] = true;
|
$event->data['request']->params['altered'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterDispatch($event) {
|
public function afterDispatch(CakeEvent $event) {
|
||||||
$event->data['response']->statusCode(304);
|
$event->data['response']->statusCode(304);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue