-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add possibility to ignore deprecation messages and/or files that emit…
… them. Add possibility to ignore deprecation messages and/or files that emit them.
- Loading branch information
Showing
10 changed files
with
277 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/vendor/ |
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
24 changes: 24 additions & 0 deletions
24
Tests/Error/Handler/DeprecationErrorHandler/ignore_file.phpt
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,24 @@ | ||
--TEST-- | ||
Test DeprecationErrorHandler in weak mode | ||
--FILE-- | ||
<?php | ||
|
||
putenv('ANSICON'); | ||
putenv('ConEmuANSI'); | ||
putenv('TERM'); | ||
|
||
$behat = __DIR__; | ||
while (!file_exists($behat . '/vendor/bin/behat')) { | ||
$behat = dirname($behat); | ||
} | ||
|
||
passthru("php -d error_reporting=32767 " . $behat . "/vendor/bin/behat --profile=ignore_file --out=default.log 2>/dev/null", $exitCode); | ||
|
||
if ($exitCode === 1) { | ||
echo "Exit code: 1"; | ||
} | ||
|
||
?> | ||
--EXPECTF-- | ||
|
||
Exit code: 1 |
34 changes: 34 additions & 0 deletions
34
Tests/Error/Handler/DeprecationErrorHandler/ignore_file_and_message.phpt
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,34 @@ | ||
--TEST-- | ||
Test DeprecationErrorHandler in weak mode | ||
--FILE-- | ||
<?php | ||
|
||
putenv('ANSICON'); | ||
putenv('ConEmuANSI'); | ||
putenv('TERM'); | ||
|
||
$behat = __DIR__; | ||
while (!file_exists($behat . '/vendor/bin/behat')) { | ||
$behat = dirname($behat); | ||
} | ||
|
||
passthru("php -d error_reporting=32767 " . $behat . "/vendor/bin/behat --profile=ignore_file_and_message --out=default.log 2>/dev/null", $exitCode); | ||
|
||
if ($exitCode === 1) { | ||
echo "Exit code: 1"; | ||
} | ||
|
||
?> | ||
--EXPECTF-- | ||
|
||
Remaining deprecation notices (2) | ||
|
||
Method 'deprecatedMethodSilenced' is deprecated: 2x | ||
2x in DeprecatedCaller::callDeprecatedMethodSilenced from Caciobanu\Behat\DeprecationExtension\Tests\Deprecated | ||
|
||
Legacy deprecation notices (4) | ||
|
||
Method 'deprecatedMethodSilenced' is deprecated: 4x | ||
4x in DeprecatedCaller::callDeprecatedMethodSilenced from Caciobanu\Behat\DeprecationExtension\Tests\Deprecated | ||
|
||
Exit code: 1 |
34 changes: 34 additions & 0 deletions
34
Tests/Error/Handler/DeprecationErrorHandler/ignore_message.phpt
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,34 @@ | ||
--TEST-- | ||
Test DeprecationErrorHandler in weak mode | ||
--FILE-- | ||
<?php | ||
|
||
putenv('ANSICON'); | ||
putenv('ConEmuANSI'); | ||
putenv('TERM'); | ||
|
||
$behat = __DIR__; | ||
while (!file_exists($behat . '/vendor/bin/behat')) { | ||
$behat = dirname($behat); | ||
} | ||
|
||
passthru("php -d error_reporting=32767 " . $behat . "/vendor/bin/behat --profile=ignore_message --out=default.log 2>/dev/null", $exitCode); | ||
|
||
if ($exitCode === 1) { | ||
echo "Exit code: 1"; | ||
} | ||
|
||
?> | ||
--EXPECTF-- | ||
|
||
Remaining deprecation notices (2) | ||
|
||
Method 'deprecatedMethodSilenced' is deprecated: 2x | ||
2x in DeprecatedCaller::callDeprecatedMethodSilenced from Caciobanu\Behat\DeprecationExtension\Tests\Deprecated | ||
|
||
Legacy deprecation notices (4) | ||
|
||
Method 'deprecatedMethodSilenced' is deprecated: 4x | ||
4x in DeprecatedCaller::callDeprecatedMethodSilenced from Caciobanu\Behat\DeprecationExtension\Tests\Deprecated | ||
|
||
Exit code: 1 |
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