Tests/Mapping/ChoiceMappingTest.php 1 location
|
@@ 43-48 (lines=6) @@
|
40 |
|
public function setUp( |
41 |
|
string $column = null |
42 |
|
) { |
43 |
|
if (is_null($column)) { |
44 |
|
$column = new Column("some_column_name", Type::getType('string'), [ |
45 |
|
'notnull' => false, |
46 |
|
'length' => 255 |
47 |
|
]); |
48 |
|
} |
49 |
|
|
50 |
|
$this->optionMappingA = $this->createMock(MappingInterface::class); |
51 |
|
$this->optionMappingB = $this->createMock(MappingInterface::class); |
Mapping/ChoiceMapping.php 1 location
|
@@ 47-56 (lines=10) @@
|
44 |
|
array $choiceMappings, |
45 |
|
string $originDescription = "" |
46 |
|
) { |
47 |
|
if (!$determinatorColumn instanceof Column) { |
48 |
|
$determinatorColumn = new Column( |
49 |
|
(string)$determinatorColumn, |
50 |
|
Type::getType('string'), |
51 |
|
[ |
52 |
|
'notnull' => false, |
53 |
|
'length' => 255, |
54 |
|
] |
55 |
|
); |
56 |
|
} |
57 |
|
|
58 |
|
$this->determinatorColumn = clone $determinatorColumn; |
59 |
|
$this->originDescription = $originDescription; |