Regular page loads work just fine. But when I'm running unit tests, IntegrationTestCase::_sendRequest calls
$url = $dispatcher->resolveUrl($url);
and then
$response = $dispatcher->execute($request);
Both of these calls apparently result in BasePlugin::bootstrap being called. So the CORS plugin's bootstrap.php is called twice. And the second time through, it overwrites the baseExceptionRenderer in the config with the value it put into exceptionRenderer the first time through. Which means that the AppExceptionRenderer class tries to extend itself, with predictable failure.
Is this some problem exclusive to my setup? Or have others simply not experienced unhandled errors during unit testing with this plugin in place?
Wonder if the bootstrap.php being called twice will also mean the middleware is registered in the queue twice, which might cause other problems?
I am loading the plugin as normal in my Application's bootstrap function:
Regular page loads work just fine. But when I'm running unit tests, IntegrationTestCase::_sendRequest calls
and then
Both of these calls apparently result in BasePlugin::bootstrap being called. So the CORS plugin's bootstrap.php is called twice. And the second time through, it overwrites the
baseExceptionRenderer
in the config with the value it put into exceptionRenderer the first time through. Which means that the AppExceptionRenderer class tries to extend itself, with predictable failure.Is this some problem exclusive to my setup? Or have others simply not experienced unhandled errors during unit testing with this plugin in place?
Wonder if the bootstrap.php being called twice will also mean the middleware is registered in the queue twice, which might cause other problems?