-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Tested that duplicate warnings are reported once. * Fixed reporting of warning/notice/deprecation so all unique issues are printed. * Fixed carriage return generation when printing issues. * Simplified issue hash. * Removed unnecessary variable. * Fixed carriage return generation when printing issues. * Removed redundant silenced warning from capabilities test. * Documented direct addition of Risky event trace to unique traces array. * Separated test to test the interaction between silenced and non-silenced traces. * Refactored test to reuse private method. * Replaced inline warning in test with helper method.
- Loading branch information
Showing
8 changed files
with
198 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--TEST-- | ||
PHPUnit only reports warnings with globally unique locations within executed tests. | ||
|
||
--ARGS-- | ||
-c test --colors=always test/CapabilitiesTest.php --filter ::testDuplicateWarnings | ||
|
||
--FILE_EXTERNAL-- | ||
../PHPUnit runner.php | ||
|
||
--EXPECTF-- | ||
PHPUnit %s | ||
|
||
Runtime: %s | ||
Configuration: %s | ||
|
||
33% [33;1mW[0m [33;1mScriptFUSIONTest\Pip\CapabilitiesTest::testDuplicateWarningsA[0m [32m(%d ms)[0m | ||
[33;1m | ||
Warning: foreach() argument must be of type array|object, int given in %s%eCapabilitiesTest.php on line %d | ||
|
||
[0m 66% [33;1mW[0m [33;1mScriptFUSIONTest\Pip\CapabilitiesTest::testDuplicateWarningsB[0m [32m(%d ms)[0m | ||
[33;1m | ||
Warning: foreach() argument must be of type array|object, int given in %s%eCapabilitiesTest.php on line %d | ||
|
||
[0m[33;1mWarning: foreach() argument must be of type array|object, int given in %s%eCapabilitiesTest.php on line %d | ||
|
||
[0m100% . [32;1mScriptFUSIONTest\Pip\CapabilitiesTest::testDuplicateWarningsC[0m [32m(%d ms)[0m | ||
|
||
|
||
Time: %s | ||
%A | ||
[30;43mOK, but %s![0m | ||
[30;43mTests: 3[0m[30;43m, Assertions: 3[0m[30;43m, Warnings: 2[0m[30;43m.[0m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--TEST-- | ||
When a test generates errors with different severities and silences some of them, first non-silenced error determines | ||
overall test status and all non-silenced messages are shown. | ||
|
||
--ARGS-- | ||
-c test --colors=always test/CapabilitiesTest.php --filter ::testMixedSeverities$ | ||
|
||
--FILE_EXTERNAL-- | ||
../PHPUnit runner.php | ||
|
||
--EXPECTF-- | ||
PHPUnit %s | ||
|
||
Runtime: %s | ||
Configuration: %s | ||
|
||
100% [33;1mN[0m [33;1mScriptFUSIONTest\Pip\CapabilitiesTest::testMixedSeverities[0m [32m(%d ms)[0m | ||
[33;1m | ||
Notice: Only variables should be assigned by reference in %s%eCapabilitiesTest.php on line %d | ||
|
||
[0m[33;1mWarning: foreach() argument must be of type array|object, int given in %s%eCapabilitiesTest.php on line %d | ||
|
||
[0m[33;1mDeprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in %s%eCapabilitiesTest.php on line %d | ||
|
||
[0m | ||
|
||
Time: %s | ||
%A | ||
[30;43mOK, but %s![0m | ||
[30;43mTests: 1[0m[30;43m, Assertions: 1[0m[30;43m, Warnings: 1[0m[30;43m, Deprecations: 1[0m[30;43m, Notices: 1[0m[30;43m.[0m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--TEST-- | ||
Test that first notice determines test status and prior silenced warning does not. | ||
|
||
--ARGS-- | ||
-c test --colors=always test/CapabilitiesTest.php --filter ::testSilencedWarningNotAffectsStatus$ | ||
|
||
--FILE_EXTERNAL-- | ||
../PHPUnit runner.php | ||
|
||
--EXPECTF-- | ||
PHPUnit %s | ||
|
||
Runtime: %s | ||
Configuration: %s | ||
|
||
100% [33;1mN[0m [33;1mScriptFUSIONTest\Pip\CapabilitiesTest::testSilencedWarningNotAffectsStatus[0m [32m(%d ms)[0m | ||
[33;1m | ||
Notice: Only variables should be assigned by reference in %s%eCapabilitiesTest.php on line %d | ||
|
||
[0m | ||
|
||
Time: %s | ||
%A | ||
[30;43mOK, but %s![0m | ||
[30;43mTests: 1[0m[30;43m, Assertions: 1[0m[30;43m, Notices: 1[0m[30;43m.[0m |