Skip to content

Commit

Permalink
Address PHPUnit deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Mar 1, 2024
1 parent b6349f3 commit 9ae78e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/Query/Sqlite/StrfTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class StrfTimeTest extends SqliteTestCase
{
/** @return array<int, array<int, string>> */
public function getFunctionFormatters(): array
public static function getFunctionFormatters(): array
{
return [
['Year', '%Y'],
Expand Down
7 changes: 2 additions & 5 deletions tests/Types/CarbonDateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Cache\Adapter\ArrayAdapter;

use function assert;

use const PHP_VERSION_ID;

/**
Expand Down Expand Up @@ -236,14 +234,13 @@ public function testImmutableTimeSetter(): void
/** @dataProvider typeProvider */
public function testTypesThatMapToAlreadyMappedDatabaseTypesRequireCommentHint($type): void
{
$platform = $this->getMockForAbstractClass('Doctrine\DBAL\Platforms\AbstractPlatform');
assert($platform instanceof AbstractPlatform);
$platform = $this->createMock(AbstractPlatform::class);

$this->assertTrue(Type::getType($type)->requiresSQLCommentHint($platform));
}

/** @return array<int, array<int, string>> */
public function typeProvider(): array
public static function typeProvider(): array
{
return [
['CarbonDate'],
Expand Down

0 comments on commit 9ae78e5

Please sign in to comment.