Closed TomasVotruba closed 11 months ago
yep it was deprecated in 9.x and already dropped in 10.x
https://statics.teams.cdn.office.net/evergreen-assets/safelinks/1/atp-safelinks.html
I'm on this issue ;)
Hey @TomasVotruba
don't you think we could add this into PhpUnit90
rules insteadof PhpUnit10
?
Hey, we usually add the rule when the change will affect users. When people upgrade to PHPUnit 9.0 and this change is not there yet, it would break.
So PHPUnit 10.0 is safer
It does not work for setMethods :'(
https://github.com/rectorphp/rector-phpunit/commit/6d9316d7c1c4ba206fe7904adfeb03521f26cc2b
I guess We need a rule for this :/
it works just in the first case
//first
$this->setMethods();
//second
$contractMock = $this->getMockBuilder(Contract::class)
->disableOriginalConstructor()
->setMethods(['getCancelledAt', 'terminate'])
->getMock();
I am on mobile, disableOriginalConstructor()
seems return different instance?
I am on mobile,
disableOriginalConstructor()
seems return different instance?
I see the issue, I will provide a PR for this
I was wondering why this issue wasn't close in the first PR, maybe you have the feling that it wasn't fixed 😄
Just to confirm that it worked <3
See https://stackoverflow.com/questions/65075204/method-setmethods-is-deprecated-when-try-to-write-a-php-unit-test