|
|
|
|
@ -11,7 +11,7 @@ use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
|
|
|
|
class DateToEntityMapperTest extends TestCase
|
|
|
|
|
{
|
|
|
|
|
public function testMapsSetter(): void
|
|
|
|
|
public function testMapsWithDifferentMethods(): void
|
|
|
|
|
{
|
|
|
|
|
// Given
|
|
|
|
|
$mapper = new DataToEntityMapper(
|
|
|
|
|
@ -22,7 +22,7 @@ class DateToEntityMapperTest extends TestCase
|
|
|
|
|
new EntityField(
|
|
|
|
|
name: 'witherVal',
|
|
|
|
|
fqcn: 'int',
|
|
|
|
|
columnName: 'witherVal',
|
|
|
|
|
columnName: 'wither_val',
|
|
|
|
|
isIdField: false,
|
|
|
|
|
writeAccess: FieldAccess::WITHER,
|
|
|
|
|
readAccess: FieldAccess::WITHER
|
|
|
|
|
@ -30,7 +30,7 @@ class DateToEntityMapperTest extends TestCase
|
|
|
|
|
new EntityField(
|
|
|
|
|
name: 'publicVal',
|
|
|
|
|
fqcn: 'int',
|
|
|
|
|
columnName: 'publicVal',
|
|
|
|
|
columnName: 'public_val',
|
|
|
|
|
isIdField: false,
|
|
|
|
|
writeAccess: FieldAccess::PUBLIC,
|
|
|
|
|
readAccess: FieldAccess::PUBLIC
|
|
|
|
|
@ -38,7 +38,7 @@ class DateToEntityMapperTest extends TestCase
|
|
|
|
|
new EntityField(
|
|
|
|
|
name: 'setterVal',
|
|
|
|
|
fqcn: 'int',
|
|
|
|
|
columnName: 'setterVal',
|
|
|
|
|
columnName: 'setter_val',
|
|
|
|
|
isIdField: false,
|
|
|
|
|
writeAccess: FieldAccess::GETSET,
|
|
|
|
|
readAccess: FieldAccess::GETSET
|
|
|
|
|
@ -56,9 +56,9 @@ class DateToEntityMapperTest extends TestCase
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$row = [
|
|
|
|
|
'witherVal' => 1,
|
|
|
|
|
'publicVal' => 2,
|
|
|
|
|
'setterVal' => 3
|
|
|
|
|
'wither_val' => 1,
|
|
|
|
|
'public_val' => 2,
|
|
|
|
|
'setter_val' => 3
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// When
|
|
|
|
|
|