Skip to content

Commit

Permalink
Remove the test that uses TestCase::getMockForAbstractClass()
Browse files Browse the repository at this point in the history
See: sebastianbergmann/phpunit#5241

It covers a platform-specific use case in the base platform class,
which is pointless.
  • Loading branch information
morozov committed Jun 16, 2023
1 parent 02adc27 commit 4ab634b
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions tests/Types/BinaryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,39 +35,6 @@ public function testReturnsBindingType(): void
self::assertSame(ParameterType::BINARY, $this->type->getBindingType());
}

/**
* @param mixed[][] $definition
*
* @dataProvider definitionProvider()
*/
public function testReturnsSQLDeclaration(array $definition, string $expectedDeclaration): void
{
$platform = $this->getMockForAbstractClass(AbstractPlatform::class);
self::assertSame($expectedDeclaration, $this->type->getSQLDeclaration($definition, $platform));
}

/** @return mixed[][] */
public static function definitionProvider(): iterable
{
return [
'fixed-unspecified-length' => [
['fixed' => true],
'BINARY',
],
'fixed-specified-length' => [
[
'fixed' => true,
'length' => 20,
],
'BINARY(20)',
],
'variable-length' => [
['length' => 20],
'VARBINARY(20)',
],
];
}

public function testBinaryNullConvertsToPHPValue(): void
{
self::assertNull($this->type->convertToPHPValue(null, $this->platform));
Expand Down

0 comments on commit 4ab634b

Please sign in to comment.