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

Not showing all test classes #164

Open
ennorehling opened this issue Aug 29, 2023 · 2 comments
Open

Not showing all test classes #164

ennorehling opened this issue Aug 29, 2023 · 2 comments

Comments

@ennorehling
Copy link

ennorehling commented Aug 29, 2023

The Test Explorer fails to pick up some tests when they extend other tests.

For example, I have the following test classes:

abstract class FooInterfaceTest extends TestCase {
    public function test_foo() {
        $this->assertTrue(true);
    }
}

final class FooTest extends FooInterfaceTest {
    public function test_bar() {
        $this->assertTrue(true);
    }
}

final class FakeFooTest extends FooInterfaceTest {
}

What I expect to see is both FakeFooTest FooTest with one and two tests respectively listed in the explorer. What I see instead is only the FooTest, and only the test_bar function that it implements, not the test(s) that it receives from the class that it extends. Running vendor/bin/phpunit from the shell runs all of my tests, the Test Explorer does not.

NB: What I'm trying to do here is to test both a class and its testing double, without duplicating the tests.

@jlecordier
Copy link

Out of curiosity, does this work when using regular PHPUnit ?

@TimoLehnertz
Copy link

Yes it does. I have the same issue. I love the extension but half my tests wont get executed because of this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants