File tree Expand file tree Collapse file tree 6 files changed +11
-4
lines changed
Expand file tree Collapse file tree 6 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ parameters:
9494 - '~^Parameter #1 \$row of method Doctrine\\DBAL\\Driver\\PgSQL\\Result\:\:mapNumericRow\(\) expects list<string\|null>, .* given\.$~'
9595
9696 # Required for Psalm compatibility
97- - '~^Property Doctrine\\DBAL\\Tests\\Types\\BaseDateTypeTestCase\:\:\$currentTimezone \(non-empty-string\) does not accept string\.$~'
97+ - '~^Property Doctrine\\DBAL\\Tests\\Types\\BaseDateTypeTestCase<TType of Doctrine\\DBAL\\Types\\Type> \:\:\$currentTimezone \(non-empty-string\) does not accept string\.$~'
9898
9999 # The @throws annotations are part of a contract. Even if the default implementation doen't throw those
100100 # exceptions, the child implementations might do so.
Original file line number Diff line number Diff line change 99use Doctrine \DBAL \Types \ConversionException ;
1010use Doctrine \DBAL \Types \Type ;
1111use PHPUnit \Framework \Attributes \DataProvider ;
12- use PHPUnit \Framework \MockObject \MockObject ;
12+ use PHPUnit \Framework \MockObject \Stub ;
1313use PHPUnit \Framework \TestCase ;
1414use stdClass ;
1515
1616use function date_default_timezone_get ;
1717use function date_default_timezone_set ;
1818
19+ /** @template TType of Type */
1920abstract class BaseDateTypeTestCase extends TestCase
2021{
21- protected AbstractPlatform &MockObject $ platform ;
22+ protected AbstractPlatform &Stub $ platform ;
23+
24+ /** @var TType */
2225 protected Type $ type ;
2326
2427 /** @var non-empty-string */
2528 private string $ currentTimezone ;
2629
2730 protected function setUp (): void
2831 {
29- $ this ->platform = $ this -> createMock (AbstractPlatform::class);
32+ $ this ->platform = self :: createStub (AbstractPlatform::class);
3033 $ this ->currentTimezone = date_default_timezone_get ();
3134 }
3235
Original file line number Diff line number Diff line change 1010
1111use function date_default_timezone_set ;
1212
13+ /** @extends BaseDateTypeTestCase<DateType> */
1314class DateTest extends BaseDateTypeTestCase
1415{
1516 protected function setUp (): void
Original file line number Diff line number Diff line change 88use Doctrine \DBAL \Types \ConversionException ;
99use Doctrine \DBAL \Types \DateTimeType ;
1010
11+ /** @extends BaseDateTypeTestCase<DateTimeType> */
1112class DateTimeTest extends BaseDateTypeTestCase
1213{
1314 protected function setUp (): void
Original file line number Diff line number Diff line change 88use Doctrine \DBAL \Types \ConversionException ;
99use Doctrine \DBAL \Types \DateTimeTzType ;
1010
11+ /** @extends BaseDateTypeTestCase<DateTimeTzType> */
1112class DateTimeTzTest extends BaseDateTypeTestCase
1213{
1314 protected function setUp (): void
Original file line number Diff line number Diff line change 88use Doctrine \DBAL \Types \ConversionException ;
99use Doctrine \DBAL \Types \TimeType ;
1010
11+ /** @extends BaseDateTypeTestCase<TimeType> */
1112class TimeTest extends BaseDateTypeTestCase
1213{
1314 protected function setUp (): void
You can’t perform that action at this time.
0 commit comments