New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPUnit_TextUI_TestRunner::run() missing exit parameter #2286

Closed
Starli0n opened this Issue Sep 1, 2016 · 0 comments

Comments

2 participants
@Starli0n

Starli0n commented Sep 1, 2016

Hi,

I tried to run some tests manually for debug purpose. I do something like:

class MyClassTest extends \PHPUnit_Framework_TestCase
{
    public static function main()
    {
        $Suite = new \PHPUnit_Framework_TestSuite('MyClassTest');
        \PHPUnit_TextUI_TestRunner::run($Suite);
        unset($Suite);
    }

and in debug.php, I call MyClassTest::main(); but I cannot chain other test suites as the run function is called with $exit = true in the doRun() function.

It would be good to have this parameter in the call like:
vendor/phpunit/phpunit/src/TextUI/TestRunner.php

    public static function run($test, array $arguments = [], $exit = true)
    (...)
            return $aTestRunner->doRun(
                $test,
                $arguments,
                $exit,
            );

So that it is transmitted to the doRun() function, so chaining tests could be possible

MyClassTest::main();
MyClass1Test::main(); // Never reached as $exit = true by default

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment