TestSuiteLoader will always consider classes from the current file

This commit is contained in:
Dylan Bridgman
2023-08-05 12:24:43 +02:00
parent 3742e74adf
commit 7baa48e068
6 changed files with 66 additions and 3 deletions

View File

@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace Tests\CustomTestCase;
class ChildTest extends ParentTest
{
private function getEntity(): bool
{
return true;
}
}

View File

@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace Tests\CustomTestCase;
use function PHPUnit\Framework\assertTrue;
use PHPUnit\Framework\TestCase;
class ParentTest extends TestCase
{
private function getEntity(): bool
{
return false;
}
/** @test */
public function testOverrideMethod(): void
{
assertTrue($this->getEntity() || true);
}
}