1111
1212declare (strict_types=1 );
1313
14- namespace Tests ;
14+ namespace Tests \ Base ;
1515
1616use DateTimeImmutable ;
17- use Tests \ AbstractBaseTestCase ;
17+ use PHPUnit \ Framework \ TestCase ;
1818use Tests \Fixtures \Entity \LogMessage ;
1919use Tests \Fixtures \Entity \User ;
2020use Tests \Fixtures \MockClock ;
2121
22- class ClockTest extends AbstractBaseTestCase
22+ abstract class BaseClockTest extends TestCase implements DatabaseBuilderInterface
2323{
2424 public function testCreatable (): void
2525 {
2626 $ now = new DateTimeImmutable ('2023-05-23 00:00:00 ' );
2727 $ clock = new MockClock ($ now );
28- $ db = self ::createDatabaseWithMockClock ($ clock );
28+ $ db = static ::createDatabaseWithMockClock ($ clock );
2929
3030 $ logMessage = new LogMessage ();
3131 $ logMessage ->setMessage ('Something happened! ' );
@@ -39,7 +39,7 @@ public function testClockRoundtrip(): void
3939 {
4040 $ now = new DateTimeImmutable ('2023-05-23 00:00:00 ' );
4141 $ clock = new MockClock ($ now );
42- $ db = self ::createDatabaseWithMockClock ($ clock );
42+ $ db = static ::createDatabaseWithMockClock ($ clock );
4343
4444 $ user = new User ();
4545 $ user ->setName ('Dave ' );
@@ -53,7 +53,7 @@ public function testClockUpdate(): void
5353 {
5454 $ now = new DateTimeImmutable ('2023-05-23 00:00:00 ' );
5555 $ clock = new MockClock ($ now );
56- $ db = self ::createDatabaseWithMockClock ($ clock );
56+ $ db = static ::createDatabaseWithMockClock ($ clock );
5757
5858 $ user = new User ();
5959 $ user ->setName ('Dave ' );
@@ -78,7 +78,7 @@ public function testClockSoftDelete(): void
7878 {
7979 $ now = new DateTimeImmutable ('2023-05-23 00:00:00 ' );
8080 $ clock = new MockClock ($ now );
81- $ db = self ::createDatabaseWithMockClock ($ clock );
81+ $ db = static ::createDatabaseWithMockClock ($ clock );
8282
8383 $ user = new User ();
8484 $ user ->setName ('Dave ' );
0 commit comments