File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -142,12 +142,8 @@ protected function createContext()
142
142
'validatePropertyValue ' ,
143
143
'getViolations ' ,
144
144
];
145
- // PHPUnit 10 removed MockBuilder::setMethods()
146
- if (method_exists ($ contextualValidatorMockBuilder , 'onlyMethods ' )) {
147
- $ contextualValidatorMockBuilder ->onlyMethods ($ contextualValidatorMethods );
148
- } else {
149
- $ contextualValidatorMockBuilder ->setMethods ($ contextualValidatorMethods );
150
- }
145
+
146
+ $ contextualValidatorMockBuilder ->onlyMethods ($ contextualValidatorMethods );
151
147
$ contextualValidator = $ contextualValidatorMockBuilder ->getMock ();
152
148
$ contextualValidator ->expects ($ this ->any ())
153
149
->method ('atPath ' )
Original file line number Diff line number Diff line change @@ -2085,7 +2085,7 @@ public function testEmptyGroupsArrayDoesNotTriggerDeprecation()
2085
2085
$ validator = $ this
2086
2086
->getMockBuilder (RecursiveValidator::class)
2087
2087
->disableOriginalConstructor ()
2088
- ->setMethods (['startContext ' ])
2088
+ ->onlyMethods (['startContext ' ])
2089
2089
->getMock ();
2090
2090
$ validator
2091
2091
->expects ($ this ->once ())
@@ -2119,7 +2119,7 @@ public function testRelationBetweenChildAAndChildB()
2119
2119
$ validator = $ this
2120
2120
->getMockBuilder (RecursiveValidator::class)
2121
2121
->disableOriginalConstructor ()
2122
- ->setMethods (['startContext ' ])
2122
+ ->onlyMethods (['startContext ' ])
2123
2123
->getMock ();
2124
2124
$ validator
2125
2125
->expects ($ this ->once ())
You can’t perform that action at this time.
0 commit comments