Skip to content
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

No useful output when an error occurs in the bootstrap script #4620

Closed
sebastianbergmann opened this issue Mar 12, 2021 · 0 comments
Closed
Assignees
Labels
feature/test-runner CLI test runner type/bug Something is broken

Comments

@sebastianbergmann
Copy link
Owner

sebastianbergmann commented Mar 12, 2021

Reported by @spriebsch:

bootstrap.php

<?php declare(strict_types=1);
throw new Exception('Big boom. Big bada boom.');

Test.php

<?php declare(strict_types=1);
use PHPUnit\Framework\TestCase;

final class Test extends TestCase
{
    public function testOne(): void
    {
        $this->assertTrue(true);
    }
}

Expected output

$ phpunit --bootstrap bootstrap.php Test.php
PHPUnit 9.5.2 by Sebastian Bergmann and contributors.

Error in bootstrap script: Exception: Big boom. Big bada boom.

Actual output

$ phpunit --bootstrap bootstrap.php Test.php
PHPUnit 9.5.2 by Sebastian Bergmann and contributors.

Big boom. Big bada boom.
@sebastianbergmann sebastianbergmann added type/bug Something is broken feature/test-runner CLI test runner labels Mar 12, 2021
@sebastianbergmann sebastianbergmann self-assigned this Mar 12, 2021
sebastianbergmann added a commit that referenced this issue Mar 12, 2021
This was referenced Mar 17, 2021
This was referenced Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/test-runner CLI test runner type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant