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()
142142 'validatePropertyValue ' ,
143143 'getViolations ' ,
144144 ];
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 );
151147 $ contextualValidator = $ contextualValidatorMockBuilder ->getMock ();
152148 $ contextualValidator ->expects ($ this ->any ())
153149 ->method ('atPath ' )
Original file line number Diff line number Diff line change @@ -2085,7 +2085,7 @@ public function testEmptyGroupsArrayDoesNotTriggerDeprecation()
20852085 $ validator = $ this
20862086 ->getMockBuilder (RecursiveValidator::class)
20872087 ->disableOriginalConstructor ()
2088- ->setMethods (['startContext ' ])
2088+ ->onlyMethods (['startContext ' ])
20892089 ->getMock ();
20902090 $ validator
20912091 ->expects ($ this ->once ())
@@ -2119,7 +2119,7 @@ public function testRelationBetweenChildAAndChildB()
21192119 $ validator = $ this
21202120 ->getMockBuilder (RecursiveValidator::class)
21212121 ->disableOriginalConstructor ()
2122- ->setMethods (['startContext ' ])
2122+ ->onlyMethods (['startContext ' ])
21232123 ->getMock ();
21242124 $ validator
21252125 ->expects ($ this ->once ())
You can’t perform that action at this time.
0 commit comments