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()
139139 'validatePropertyValue ' ,
140140 'getViolations ' ,
141141 ];
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 );
148144 $ contextualValidator = $ contextualValidatorMockBuilder ->getMock ();
149145 $ contextualValidator ->expects ($ this ->any ())
150146 ->method ('atPath ' )
Original file line number Diff line number Diff line change @@ -2091,7 +2091,7 @@ public function testEmptyGroupsArrayDoesNotTriggerDeprecation()
20912091 $ validator = $ this
20922092 ->getMockBuilder (RecursiveValidator::class)
20932093 ->disableOriginalConstructor ()
2094- ->setMethods (['startContext ' ])
2094+ ->onlyMethods (['startContext ' ])
20952095 ->getMock ();
20962096 $ validator
20972097 ->expects ($ this ->once ())
@@ -2125,7 +2125,7 @@ public function testRelationBetweenChildAAndChildB()
21252125 $ validator = $ this
21262126 ->getMockBuilder (RecursiveValidator::class)
21272127 ->disableOriginalConstructor ()
2128- ->setMethods (['startContext ' ])
2128+ ->onlyMethods (['startContext ' ])
21292129 ->getMock ();
21302130 $ validator
21312131 ->expects ($ this ->once ())
You can’t perform that action at this time.
0 commit comments