Comments (11)
Can you please post here the plain output of the test using PHPUnit (and not Paraunit?)
from paraunit.
PHPUnit 4.8.21 by Sebastian Bergmann and contributors.
PHP Warning: sprintf(): Too few arguments in /var/www/collaboratori2/src/Facile/Cbr/AgendaBundle/Tests/Functional/Controller/CollaboratoreNonProduttivoControllerTest.php on line 53
.
Warning: sprintf(): Too few arguments in /var/www/collaboratori2/src/Facile/Cbr/AgendaBundle/Tests/Functional/Controller/CollaboratoreNonProduttivoControllerTest.php on line 53
Time: 1.05 seconds, Memory: 89.00Mb
OK (1 test, 4 assertions)
from paraunit.
Ah understood. The issue is in the parser: the regex tries to identify the test's results, and it catches some capital F within the warnings. I'm not sure if this could be fixed, I'll try to improve the regex.
from paraunit.
I did some research, and I found that PHPUnit should intercepts PHP Errors and warnings:
By default, PHPUnit converts PHP errors, warnings, and notices that are triggered during the execution of a test to an exception. Using these exceptions, you can, for instance, expect a test to trigger a PHP error [...]
I can't reproduce your problem with a test, how are you getting it @Algatux ?
from paraunit.
sprintf("text %s, %s",'hello');
from paraunit.
With that, I got this:
PHPUnit 5.1.0 by Sebastian Bergmann and contributors.
...E... 7 / 7 (100%)
Time: 86 ms, Memory: 3.50Mb
There was 1 error:
1) Paraunit\Tests\Unit\TestResultsParserTest::testParseAndContinue with data set #3 (Paraunit\Tests\Stub\StubbedParaProcess Object (...), 'PROVA')
sprintf(): Too few arguments
/home/paraunit/projects/src/Paraunit/Tests/Unit/TestResultsParserTest.php:17
FAILURES!
Tests: 7, Assertions: 12, Errors: 1.
I thought that PHPUnit 5 could cause the issue, but I got the same output with 4.8...
from paraunit.
Is it possible that using a dataprovider implies a change in the output message ?
from paraunit.
Is the malformed sprintf executed in the dataProvider?
from paraunit.
No, I'm doing it in the test. Anyhow, it's the documented behavior. You have the sprintf in a Symfony controller maybe? Maybe Symfony is catching the warning in some way...
from paraunit.
It looks like PhpUnit does not capture warnings while executing a test provider.
Here is an example: https://gist.github.com/taueres/0bf3c29b70736a9178b9
from paraunit.
Closing this as not reproducible. I will try to improve the regex in the future to avoid similar issues.
from paraunit.
Related Issues (20)
- Implement passthrough option
- Re evaluate PHPUnit CLI options
- Change injection point
- Differentiate between test outcome and issue
- Use autowiring
- Remove AbstractEvent
- Simplify Process objects
- Mark tests with coverage missing
- Handle `--column` option
- Handle all `--display-*` options HOT 1
- Handle all `--stop-on-*` options HOT 1
- Handle `--exclude-testsuite` and `--test-suffix` options
- Handle `--order-by` and `--random-order-seed` options
- Handle `--warm-coverage-cache` option
- Handle `--log-junit` option HOT 5
- Implement `--print-failed-early` option for version 1.x
- PHPUnit version visibility
- PHPUnit's string comparison diff is not handled by ParaUnit HOT 2
- PHPUnitError event is not handled
- crashing on --exclude-group 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 paraunit.