Skip to content

Commit 745cb5b

Browse files
committed
feat(identifier): harden test on existing value not updated
1 parent 0979712 commit 745cb5b

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

tests/AutoMapperTest/DeepPopulateMergeExisting/expected.adder.data

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ AutoMapper\Tests\AutoMapperTest\DeepPopulateMergeExisting\FooAdder {
33
AutoMapper\Tests\AutoMapperTest\DeepPopulateMergeExisting\Bar {
44
-id: 1
55
+bar: "bar3"
6+
+foo: "foo1"
67
}
78
AutoMapper\Tests\AutoMapperTest\DeepPopulateMergeExisting\Bar {
89
-id: 10
910
+bar: "bar4"
11+
+foo: "default"
1012
}
1113
]
1214
}

tests/AutoMapperTest/DeepPopulateMergeExisting/expected.array.data

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ AutoMapper\Tests\AutoMapperTest\DeepPopulateMergeExisting\Foo {
33
AutoMapper\Tests\AutoMapperTest\DeepPopulateMergeExisting\Bar {
44
-id: 1
55
+bar: "bar3"
6+
+foo: "foo1"
67
}
78
AutoMapper\Tests\AutoMapperTest\DeepPopulateMergeExisting\Bar {
89
-id: 10
910
+bar: "bar4"
11+
+foo: "default"
1012
}
1113
]
1214
}

tests/AutoMapperTest/DeepPopulateMergeExisting/expected.collection.data

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ AutoMapper\Tests\AutoMapperTest\DeepPopulateMergeExisting\FooWithArrayCollection
44
AutoMapper\Tests\AutoMapperTest\DeepPopulateMergeExisting\Bar {
55
-id: 1
66
+bar: "bar3"
7+
+foo: "foo1"
78
}
89
AutoMapper\Tests\AutoMapperTest\DeepPopulateMergeExisting\Bar {
910
-id: 10
1011
+bar: "bar4"
12+
+foo: "default"
1113
}
1214
]
1315
}

tests/AutoMapperTest/DeepPopulateMergeExisting/map.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class Bar
1515

1616
public string $bar;
1717

18+
public string $foo = 'default';
19+
1820
public function setId(int $id): void
1921
{
2022
$this->id = $id;
@@ -76,6 +78,7 @@ class FooWithArrayCollection
7678

7779
$bar1 = new Bar();
7880
$bar1->bar = 'bar1';
81+
$bar1->foo = 'foo1';
7982
$bar1->setId(1);
8083

8184
$bar2 = new Bar();

0 commit comments

Comments
 (0)