Skip to content

Commit

Permalink
name data provider cases
Browse files Browse the repository at this point in the history
  • Loading branch information
petrduda committed Feb 9, 2023
1 parent f72aff6 commit 86f458c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/Enum/Type/EnumTypeIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ class EnumTypeIntegrationTest extends \PHPUnit\Framework\TestCase
*/
public function convertEnumToDatabaseDataProvider(): Generator
{
yield [
yield 'float enum' => [
'type' => DoctrineType::getType(FloatEnumType::NAME),
'enum' => FooFloatEnum::get(FooFloatEnum::ONE),
'expectedValue' => FooFloatEnum::ONE,
];
yield [
yield 'integer enum' => [
'type' => DoctrineType::getType(IntegerEnumType::NAME),
'enum' => FooIntegerEnum::get(FooIntegerEnum::ONE),
'expectedValue' => FooIntegerEnum::ONE,
];
yield [
yield 'string enum' => [
'type' => DoctrineType::getType(StringEnumType::NAME),
'enum' => FooStringEnum::get(FooStringEnum::ONE),
'expectedValue' => FooStringEnum::ONE,
];
yield [
yield 'boolean enum' => [
'type' => DoctrineType::getType(BooleanEnumType::NAME),
'enum' => FooBooleanEnum::get(FooBooleanEnum::ENABLED),
'expectedValue' => FooBooleanEnum::ENABLED,
Expand All @@ -58,16 +58,16 @@ public function testConvertEnumToDatabase(DoctrineType $type, Enum $enum, $expec
*/
public function enumTypesDataProvider(): Generator
{
yield [
yield 'float enum' => [
'type' => DoctrineType::getType(FloatEnumType::NAME),
];
yield [
yield 'integer enum' => [
'type' => DoctrineType::getType(IntegerEnumType::NAME),
];
yield [
yield 'string enum' => [
'type' => DoctrineType::getType(StringEnumType::NAME),
];
yield [
yield 'boolean enum' => [
'type' => DoctrineType::getType(BooleanEnumType::NAME),
];
}
Expand All @@ -88,19 +88,19 @@ public function testConvertNullToDatabase(DoctrineType $type): void
*/
public function convertScalarValueToDatabaseDataProvider(): Generator
{
yield [
yield 'float enum' => [
'type' => DoctrineType::getType(FloatEnumType::NAME),
'scalarValue' => FooFloatEnum::ONE,
];
yield [
yield 'integer enum' => [
'type' => DoctrineType::getType(IntegerEnumType::NAME),
'scalarValue' => FooIntegerEnum::ONE,
];
yield [
yield 'string enum' => [
'type' => DoctrineType::getType(StringEnumType::NAME),
'scalarValue' => FooStringEnum::ONE,
];
yield [
yield 'boolean enum' => [
'type' => DoctrineType::getType(BooleanEnumType::NAME),
'scalarValue' => FooBooleanEnum::ENABLED,
];
Expand All @@ -123,16 +123,16 @@ public function testConvertScalarValueToDatabase(DoctrineType $type, $scalarValu
*/
public function enumTypeClassesDataProvider(): Generator
{
yield [
yield 'float enum' => [
'typeClass' => FloatEnumType::class,
];
yield [
yield 'integer enum' => [
'typeClass' => IntegerEnumType::class,
];
yield [
yield 'string enum' => [
'typeClass' => StringEnumType::class,
];
yield [
yield 'boolean enum' => [
'typeClass' => BooleanEnumType::class,
];
}
Expand Down

0 comments on commit 86f458c

Please sign in to comment.