Skip to content

Not showing all test classes #164

@ennorehling

Description

@ennorehling

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions