Reputation: 15
I have error on cakePHP 3.6 when I try run test with request. I tried go with this tutorial http stack to an existing application, but I had everything updated. I didn't update cakePHP. I started from 3.6. This error is in cakephp core. Someone have idea how to fix it? I don't even know where should I search error
Dispatcher is deprecated. You should update your application to use the Http\Server implementation instead. - vendor/cakephp/cakephp/src/TestSuite/LegacyRequestDispatcher.php, line: 73 You can disable deprecation warnings by setting
Error.errorLevel
toE_ALL & ~E_USER_DEPRECATED
in your config/app.php. in [vendor/cakephp/cakephp/src/Core/functions.php, line 310]
Upvotes: 0
Views: 489
Reputation: 106
Check that you are calling parent::setUp()
in your test case's setUp()
method. Otherwise IntegrationTestCase
won't use MiddleWareDispatcher
and will fall back to deprecated LegacyRequestDispatcher
.
(Look at IntegrationTestCase::_makeDispatcher()
and IntegrationTestCase::setUp()
for details on how IntegrationTestCase
determines what dispatcher class to use.)
Upvotes: 1