Skip to content

Generate expected.*.data files with newline at the end #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/AutoMapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ public function testAutoMapperFixtures(string $mapFile, string $directory): void
}

if ($_SERVER['UPDATE_FIXTURES'] ?? false) {
file_put_contents($expectedFile, $dump);
file_put_contents($expectedFile, $dump . "\n");
}

if (!file_exists($expectedFile)) {
Expand Down
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/ArrayAccess/expected.1.data
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ AutoMapper\Tests\AutoMapperTest\ArrayAccess\LikeArray {
flag::STD_PROP_LIST: false
flag::ARRAY_AS_PROPS: false
iteratorClass: "ArrayIterator"
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/ArrayAccess/expected.data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AutoMapper\Tests\AutoMapperTest\ArrayAccess\Foo {
+foo: "foofoo"
+bar: 10
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/ArrayConsistency/expected.to.data
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ AutoMapper\Tests\AutoMapperTest\ArrayConsistency\To {
2
3
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ AutoMapper\Tests\AutoMapperTest\ArrayConsistency\ToAdder {
2
3
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ AutoMapper\Tests\AutoMapperTest\ArrayConsistency\ToAdderCollection {
5 => 3
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ AutoMapper\Tests\AutoMapperTest\ArrayConsistency\ToCollection {
3
]
}
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/ArrayNested/expected.array.data
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ AutoMapper\Tests\AutoMapperTest\ArrayNested\TestTarget {
"param2"
]
}
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/BuiltinClass/expected.data
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[]
[]
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/CircularReferenceDeep/expected.data
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ AutoMapper\Tests\AutoMapperTest\CircularReferenceDeep\CircularFoo {#1
+foo: AutoMapper\Tests\AutoMapperTest\CircularReferenceDeep\CircularFoo {#1}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
"city" => "city"
]
]
]
]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AutoMapper\Exception\MissingConstructorArgumentsException {
+class: "AutoMapper\Exception\MissingConstructorArgumentsException"
+message: "Cannot create an instance of "AutoMapper\Tests\AutoMapperTest\ConstructorWithRelation\UserConstructorDTOWithRelation" from mapping data because its constructor requires the following parameters to be present : "$int"."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ AutoMapper\Tests\AutoMapperTest\ConstructorWithRelation\UserConstructorDTOWithRe
}
+name: "foo"
+age: 30
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ AutoMapper\Tests\AutoMapperTest\ConstructorWithRelation\UserConstructorDTOWithRe
}
+name: "foo"
+age: 30
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
AutoMapper\Tests\AutoMapperTest\ConstructorWithSerializedName\Bar {
+isStatic: true
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[
"is_static" => true
]
]
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/Covariance/expected.data
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
AutoMapper\Tests\AutoMapperTest\Covariance\ExtendedA {
#b: AutoMapper\Tests\AutoMapperTest\Covariance\ExtendedB {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ AutoMapper\Tests\AutoMapperTest\DeepPopulateWithArrayCollection\Foo {
+bar: "bar4"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ AutoMapper\Tests\AutoMapperTest\DeepPopulateWithArrayCollection\FooWithArrayColl
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
"address" => "flat"
"addressDocBlock" => "flat"
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"name" => "my name"
"type" => "type_a"
]
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ AutoMapper\Tests\AutoMapperTest\DiscriminatorMapAndInterface\Something {
+myInterface: AutoMapper\Tests\AutoMapperTest\DiscriminatorMapAndInterface\TypeA {
+name: "my name"
}
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/DiscriminatorPopulate/expected.data
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ AutoMapper\Tests\AutoMapperTest\DiscriminatorPopulate\LinkWrapper {
+link: "https://example.com/new"
+description: "description"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ AutoMapper\Tests\AutoMapperTest\DoctrineCollections\Library {
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"name" => "Imbalance"
]
]
]
]
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/GroupOverride/expected.data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
"id" => "id"
"name" => "name"
]
]
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/Ignore/expected.ignore-in-source.data
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[]
[]
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/Ignore/expected.ignore-in-target.data
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
AutoMapper\Tests\AutoMapperTest\Ignore\FooIgnore {
+id: null
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/Issue111/expected.data
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ AutoMapper\Tests\AutoMapperTest\Issue111\Foo {
+name: "blue"
}
]
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/Issue425/expected.data
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ AutoMapper\Tests\AutoMapperTest\Issue425\Bar {
4
5
]
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/IssueParamDocBlock/expected.data
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"foo1"
"foo2"
]
]
]
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/MaxDepth/expected.data
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"id" => 1
]
"id" => 0
]
]
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/NoProperties/expected.data
Original file line number Diff line number Diff line change
@@ -1 +1 @@
AutoMapper\Tests\AutoMapperTest\NoProperties\FooNoProperties {}
AutoMapper\Tests\AutoMapperTest\NoProperties\FooNoProperties {}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/NoTypes/expected.data
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[
"city" => "test"
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ AutoMapper\Tests\AutoMapperTest\ObjectWithPropertyAsUnknownArray\Page {
"name" => "my name"
]
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ AutoMapper\Tests\AutoMapperTest\ObjectWithPropertyAsUnknownArray\PageDto {
+name: "my name"
}
]
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/Paramters/expected.int.data
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"bar"
"baz"
]
]
]
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/Paramters/expected.mixed.data
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"azerty" => "bar"
1 => "baz"
]
]
]
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/Paramters/expected.string.data
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"bar" => "qwerty"
"baz" => "dvorak"
]
]
]
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/Private/expected.data
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ AutoMapper\Tests\AutoMapperTest\Private\PrivateUserDTO {
-id: 10
-firstName: "foo"
-lastName: "bar"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AutoMapper\Tests\AutoMapperTest\PrivatePropertyInConstructors\ChildClass {
-parentProp: "foo"
-childProp: "bar"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AutoMapper\Tests\AutoMapperTest\PrivatePropertyInConstructors\ChildClass {
-parentProp: "foo"
-childProp: "bar"
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/Provider/expected.bar-foo.data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AutoMapper\Tests\AutoMapperTest\Provider\MyObject {
+foo: "foo"
+bar: "foo"
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/Provider/expected.bar.data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AutoMapper\Tests\AutoMapperTest\Provider\MyObject {
+foo: "bar"
+bar: "foo"
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/Provider/expected.early-return.data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AutoMapper\Tests\AutoMapperTest\Provider\MyObject {
+foo: "bar"
+bar: "foo"
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/SkipNullValues/expected.data
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
AutoMapper\Tests\AutoMapperTest\SkipNullValues\Entity {
-name: "foobar"
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/StdObject/expected.data
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
+"nestedStd": {
+"id": 2
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ AutoMapper\Tests\AutoMapperTest\SymfonyUId\SymfonyUuidUser {
toBase32: "0AAG8ZXZKS27QSZTN1MWNYTX0J"
}
+name: "Grégoire Pineau"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
"name" => "Grégoire Pineau"
"uuid" => "42650c8f-f5d0-3b1d-a338-f821651471ff"
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ AutoMapper\Tests\AutoMapperTest\SymfonyUId\SymfonyUuidUser {
toBase32: "4XQVKJSTZ58M788F5V0VN7ZN5Y"
}
+name: "Grégoire Pineau"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ AutoMapper\Tests\AutoMapperTest\SymfonyUId\SymfonyUlidUser {
time: "2021-02-01 07:34:28.260 UTC"
}
+name: "Grégoire Pineau"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
"name" => "Grégoire Pineau"
"ulid" => "01EXE89XR69GERC6GV3J4X38FJ"
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ AutoMapper\Tests\AutoMapperTest\SymfonyUId\SymfonyUlidUser {
time: "2021-02-01 07:36:03.157 UTC"
}
+name: "Grégoire Pineau"
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/TargetToPopulate/expected.data
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ AutoMapper\Tests\AutoMapperTest\TargetToPopulate\VatEntity {
-standardVatRate: 21.0
-reducedVatRate: 5.5
-displayIncVatPrices: true
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/UninitializedProperties/expected.data
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ AutoMapper\Tests\AutoMapperTest\UninitializedProperties\User {
+lastName: "Doe"
+firstName: "John"
+birthDate: ? ?DateTimeImmutable
}
}
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/UnionProperty/expected.bar.data
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"prop" => [
"bar" => "bar"
]
]
]
2 changes: 1 addition & 1 deletion tests/AutoMapperTest/UnionProperty/expected.foo.data
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"prop" => [
"foo" => "foo"
]
]
]