Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 83b09ba

Browse filesBrowse files
committed
Don't use die() in PHPT --SKIPIF--
Unlocks a performance optimization in PHPUnit 11.x see https://staabm.github.io/2024/10/19/phpunit-codesprint-munich.html
1 parent 6d85dab commit 83b09ba
Copy full SHA for 83b09ba

File tree

Expand file treeCollapse file tree

9 files changed

+11
-11
lines changed
Filter options
Expand file treeCollapse file tree

9 files changed

+11
-11
lines changed

‎src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/log_file.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/log_file.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
Test DeprecationErrorHandler with log file
33
--SKIPIF--
4-
<?php if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10.0', '>=')) die('Skipping on PHPUnit 10+');
4+
<?php if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10.0', '>=')) echo 'Skipping on PHPUnit 10+';
55
--FILE--
66
<?php
77
$filename = tempnam(sys_get_temp_dir(), 'sf-');

‎src/Symfony/Bridge/PhpUnit/Tests/expectdeprecationfail.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/Tests/expectdeprecationfail.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
Test ExpectDeprecationTrait failing tests
33
--SKIPIF--
4-
<?php if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10.0', '>=')) die('Skipping on PHPUnit 10+');
4+
<?php if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10.0', '>=')) echo 'Skipping on PHPUnit 10+';
55
--FILE--
66
<?php
77
$test = realpath(__DIR__.'/FailTests/ExpectDeprecationTraitTestFail.php');

‎src/Symfony/Bridge/PhpUnit/Tests/expectnotrisky.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/Tests/expectnotrisky.phpt
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Test NoAssertionsTestNotRisky not risky test
33
--SKIPIF--
44
<?php
5-
if ('\\' === DIRECTORY_SEPARATOR && !extension_loaded('mbstring')) die('Skipping on Windows without mbstring');
6-
if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10.0', '>=')) die('Skipping on PHPUnit 10+');
5+
if ('\\' === DIRECTORY_SEPARATOR && !extension_loaded('mbstring')) echo 'Skipping on Windows without mbstring';
6+
if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10.0', '>=')) echo 'Skipping on PHPUnit 10+';
77
--FILE--
88
<?php
99
$test = realpath(__DIR__.'/FailTests/NoAssertionsTestNotRisky.php');

‎src/Symfony/Bridge/PhpUnit/Tests/expectrisky.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/Tests/expectrisky.phpt
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Test NoAssertionsTestRisky risky test
33
--SKIPIF--
44
<?php
5-
if ('\\' === DIRECTORY_SEPARATOR && !extension_loaded('mbstring')) die('Skipping on Windows without mbstring');
6-
if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10.0', '>=')) die('Skipping on PHPUnit 10+');
5+
if ('\\' === DIRECTORY_SEPARATOR && !extension_loaded('mbstring')) echo 'Skipping on Windows without mbstring';
6+
if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10.0', '>=')) echo 'Skipping on PHPUnit 10+';
77
--FILE--
88
<?php
99
$test = realpath(__DIR__.'/FailTests/NoAssertionsTestRisky.php');

‎src/Symfony/Bridge/PhpUnit/Tests/symfonyextension.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/Tests/symfonyextension.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
--SKIPIF--
33
<?php
4-
if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10', '<')) die('Skipping on PHPUnit < 10');
4+
if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10', '<')) echo 'Skipping on PHPUnit < 10';
55
--FILE--
66
<?php
77
passthru(\sprintf('NO_COLOR=1 php %s/simple-phpunit.php -c %s/Fixtures/symfonyextension/phpunit-with-extension.xml.dist %s/SymfonyExtension.php', getenv('SYMFONY_SIMPLE_PHPUNIT_BIN_DIR'), __DIR__, __DIR__));

‎src/Symfony/Bridge/PhpUnit/Tests/symfonyextensionnotregistered.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/Tests/symfonyextensionnotregistered.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
--SKIPIF--
33
<?php
4-
if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10', '<')) die('Skipping on PHPUnit < 10');
4+
if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10', '<')) echo 'Skipping on PHPUnit < 10';
55
--FILE--
66
<?php
77
passthru(\sprintf('NO_COLOR=1 php %s/simple-phpunit.php -c %s/Fixtures/symfonyextension/phpunit-without-extension.xml.dist %s/SymfonyExtension.php', getenv('SYMFONY_SIMPLE_PHPUNIT_BIN_DIR'), __DIR__, __DIR__));

‎src/Symfony/Component/Console/Tests/phpt/alarm/command_exit.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/phpt/alarm/command_exit.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
Test command that exits
33
--SKIPIF--
4-
<?php if (!extension_loaded("pcntl")) die("Skipped: pcntl extension required."); ?>
4+
<?php if (!extension_loaded("pcntl")) echo "Skipped: pcntl extension required."; ?>
55
--FILE--
66
<?php
77

‎src/Symfony/Component/Console/Tests/phpt/signal/command_exit.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/phpt/signal/command_exit.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
Test command that exits
33
--SKIPIF--
4-
<?php if (!extension_loaded("pcntl")) die("Skipped: pcntl extension required."); ?>
4+
<?php if (!extension_loaded("pcntl")) echo "Skipped: pcntl extension required."; ?>
55
--FILE--
66
<?php
77

‎src/Symfony/Component/Runtime/Tests/phpt/dotenv_overload.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Component/Runtime/Tests/phpt/dotenv_overload.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
Test Dotenv overload
33
--SKIPIF--
4-
<?php require dirname(__DIR__, 6).'/vendor/autoload.php'; if (4 > (new \ReflectionMethod(\Symfony\Component\Dotenv\Dotenv::class, 'bootEnv'))->getNumberOfParameters()) die('Skip because Dotenv version is too low');
4+
<?php require dirname(__DIR__, 6).'/vendor/autoload.php'; if (4 > (new \ReflectionMethod(\Symfony\Component\Dotenv\Dotenv::class, 'bootEnv'))->getNumberOfParameters()) echo 'Skip because Dotenv version is too low';
55
--INI--
66
display_errors=1
77
--FILE--

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.