Comments (12)
@assertCode
doesn't work? https://github.com/nette/nette/blob/master/tests/Nette/Diagnostics/Debugger.E_ERROR.production.phpt#L8
from tester.
Oh, I forgot to run it by php-cgi
. Thank you, I get it.
EDIT: Deleted unnecessary part in issue message.
from tester.
Good point. In fact, the problem is bigger, because we have no assurance that Debugger::$onFatalError was called. We have, die(0);
from tester.
Ok, I have removed exit() from this 4ebc7a0#L0R42 and added @ExitCode 75a2fe8
from tester.
@dg 👍 But error message from Helpers::setup() still polute the stdoout. What about this solution? milo@c9168c6
from tester.
The idea is: shutdown function from Helpers::setup() is the first one. On fatal error, is called as first and appends next shutdown function on the queue end.
from tester.
This will work only if no other shutdown function will call die(). And Debugger calls die() https://github.com/nette/nette/blob/master/Nette/Diagnostics/Debugger.php#L470.
from tester.
Debugger expects fatal error and test generates one for this purpose. Exit code is fine. I was thinking, that Helpers::setup()'s handler should catch and inform about unexpected fatal error.
from tester.
Yes, I agree. Merged 5d77edc
from tester.
Fuck… https://bugs.php.net/bug.php?id=65275
from tester.
Heh, that is what I commented out in this issue topic message. I was thinking that it is some kind of CLI speciality.
And really nice bug numbers 😄
from tester.
It looks like as some kind of "protection". Only zero code (program success) can be overwritten, any other is kept, so shutdown function cannot chage it to zero.
from tester.
Related Issues (20)
- Dumper bug in version 1.7.1 HOT 8
- Teamcity native support HOT 6
- FileMock test fails in PHP 7.3.0beta3 HOT 1
- Missing response code assertion HOT 2
- Class 'SimpleXMLElement' not found
- bypassFinals: touch() expects parameter 2 to be integer, null given
- bypassFinals: breaks file locking HOT 1
- E_USER_WARNING: File's modification time is in the future. Cannot update it: touch(): Tester\FileMock::stream_metadata is not implemented! HOT 4
- Support for minor distinction of exceptions HOT 3
- Annotation like @accessPrivateMethod HOT 3
- Add warning about wrong regex form in Assert::match() in tester output HOT 1
- PHP 7.4 support HOT 4
- Runner: Waiting for last async Job causes high CPU usage HOT 1
- Wrong usage of ANSI terminal colors HOT 2
- dataProvider & Tester\DataProvider::testQuery() must be of the type string
- fwrite to php://stderr throws E_NOTICE on php 7.4 HOT 21
- Export coverage to Cobertura xml format HOT 1
- `\Tester\TestCase::tearDown` is not executed on php crash HOT 3
- Tracking deprecations HOT 6
- Assert::type should accept native type names "boolean" and "double" HOT 1
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 tester.