Skip to content

Commit 1476fd6

Browse files
minor #54768 Remove calls to onConsecutiveCalls() (alexandre-daubois)
This PR was merged into the 5.4 branch. Discussion ---------- Remove calls to `onConsecutiveCalls()` | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT cc `@OskarStark` as we did a lot of stuff on tests migration last year Commits ------- 4118849d86 Remove calls to `onConsecutiveCalls()`
2 parents 8a2f9f7 + ac431bd commit 1476fd6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Tests/Mapping/Loader/PropertyInfoLoaderTest.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ public function testLoadClassMetadata()
5454
'noAutoMapping',
5555
])
5656
;
57+
5758
$propertyInfoStub
5859
->method('getTypes')
59-
->will($this->onConsecutiveCalls(
60+
->willReturn(
6061
[new Type(Type::BUILTIN_TYPE_STRING, true)],
6162
[new Type(Type::BUILTIN_TYPE_STRING)],
6263
[new Type(Type::BUILTIN_TYPE_STRING, true), new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_BOOL)],
@@ -69,11 +70,12 @@ public function testLoadClassMetadata()
6970
[new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true, null, new Type(Type::BUILTIN_TYPE_FLOAT))],
7071
[new Type(Type::BUILTIN_TYPE_STRING)],
7172
[new Type(Type::BUILTIN_TYPE_STRING)]
72-
))
73+
)
7374
;
75+
7476
$propertyInfoStub
7577
->method('isWritable')
76-
->will($this->onConsecutiveCalls(
78+
->willReturn(
7779
true,
7880
true,
7981
true,
@@ -86,7 +88,7 @@ public function testLoadClassMetadata()
8688
true,
8789
false,
8890
true
89-
))
91+
)
9092
;
9193

9294
$propertyInfoLoader = new PropertyInfoLoader($propertyInfoStub, $propertyInfoStub, $propertyInfoStub, '{.*}');
@@ -222,9 +224,10 @@ public function testClassNoAutoMapping()
222224
->method('getProperties')
223225
->willReturn(['string', 'autoMappingExplicitlyEnabled'])
224226
;
227+
225228
$propertyInfoStub
226229
->method('getTypes')
227-
->willReturnOnConsecutiveCalls(
230+
->willReturn(
228231
[new Type(Type::BUILTIN_TYPE_STRING)],
229232
[new Type(Type::BUILTIN_TYPE_BOOL)]
230233
);

0 commit comments

Comments
 (0)