Comments (6)
In your tests setUp()
function, you can exclude ErrorHeroModule
from "modules" config, with assumption, your setUp()
will be as follow:
public function setUp()
{
// The module configuration should still be applicable for tests.
// You can override configuration here with test case specific values,
// such as sample view templates, path stacks, module_listener_options,
// etc.
$configOverrides = [];
$appConfig = include __DIR__ . '/../../../../config/application.config.php';
$appConfig['modules'] = \array_filter($appConfig['modules'], function($v, $k) {
return $v !== 'ErrorHeroModule';
}, ARRAY_FILTER_USE_BOTH);
$this->setApplicationConfig(ArrayUtils::merge(
$appConfig,
$configOverrides
));
parent::setUp();
}
In above code, the $appConfig
variable that passed to setApplicationConfig()
already exclude the ErrorHeroModule
that filtered via array_filter.
from errorheromodule.
Ok! Thanks for the fast reply! I'll use it for most of the tests!
But what if I want to actually test the integration with ErrorHeroModule?
from errorheromodule.
I think you can add \ob_get_flush();
in early in the setUp()
method, eg:
public function setUp()
{
\ob_get_flush();
// The module configuration should still be applicable for tests.
// You can override configuration here with test case specific values,
// such as sample view templates, path stacks, module_listener_options,
// etc.
$configOverrides = [];
$this->setApplicationConfig(ArrayUtils::merge(
include __DIR__ . '/../../../../config/application.config.php',
$configOverrides
));
parent::setUp();
}
from errorheromodule.
Thank you!
from errorheromodule.
@anatolykhelmer I've tagged new release 2.19.0 to ensure \ob_end_flush() executed while ob_get_level() > 0 before \ob_start() to flush and turn off existing active output buffering if any.
That's should handle that automatically.
from errorheromodule.
Thanks!
from errorheromodule.
Related Issues (19)
- mail attachment on upload error HOT 1
- zend-expressive support HOT 1
- trace and request_data always empty HOT 12
- Mqtt enhancement HOT 1
- Exceptions Listeners Priority HOT 3
- Example for MQTT implementation HOT 3
- Ignoring errors suppressed by @ HOT 8
- Wrong format of timestamp HOT 2
- Keeping ErrorHandler::class in ZE3 pipeline.php hides descriptive error messages HOT 6
- If the Ajax message is used, the HTTP response code shouldn't be 200 HOT 2
- Refactor to allow more fatal error logging HOT 1
- error-hero-module downgrades from 2.16.0 to 2.3.0 when I update beberlei/assert to v3.1.0 HOT 1
- display_errors setting being set to 1 does not show errors in browser. HOT 2
- PHP 8 throws Fatal Error in Logging.php when loading a Mezzio page via AJAX HOT 3
- Cannot change layout HOT 3
- enable/disable error-preview page
- Can't update my composer since weeks HOT 6
- excluded errors are not excluded HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from errorheromodule.