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 @@ -139,12 +139,8 @@ protected function createContext()
139
139
'validatePropertyValue ' ,
140
140
'getViolations ' ,
141
141
];
142
- // PHPUnit 10 removed MockBuilder::setMethods()
143
- if (method_exists ($ contextualValidatorMockBuilder , 'onlyMethods ' )) {
144
- $ contextualValidatorMockBuilder ->onlyMethods ($ contextualValidatorMethods );
145
- } else {
146
- $ contextualValidatorMockBuilder ->setMethods ($ contextualValidatorMethods );
147
- }
142
+
143
+ $ contextualValidatorMockBuilder ->onlyMethods ($ contextualValidatorMethods );
148
144
$ contextualValidator = $ contextualValidatorMockBuilder ->getMock ();
149
145
$ contextualValidator ->expects ($ this ->any ())
150
146
->method ('atPath ' )
Original file line number Diff line number Diff line change @@ -2091,7 +2091,7 @@ public function testEmptyGroupsArrayDoesNotTriggerDeprecation()
2091
2091
$ validator = $ this
2092
2092
->getMockBuilder (RecursiveValidator::class)
2093
2093
->disableOriginalConstructor ()
2094
- ->setMethods (['startContext ' ])
2094
+ ->onlyMethods (['startContext ' ])
2095
2095
->getMock ();
2096
2096
$ validator
2097
2097
->expects ($ this ->once ())
@@ -2125,7 +2125,7 @@ public function testRelationBetweenChildAAndChildB()
2125
2125
$ validator = $ this
2126
2126
->getMockBuilder (RecursiveValidator::class)
2127
2127
->disableOriginalConstructor ()
2128
- ->setMethods (['startContext ' ])
2128
+ ->onlyMethods (['startContext ' ])
2129
2129
->getMock ();
2130
2130
$ validator
2131
2131
->expects ($ this ->once ())
You can’t perform that action at this time.
0 commit comments