lundi 30 novembre 2020

Method 'setMethods' is deprecated when try to write a PHP Unit Test

I want to create a mock to replace a resource:

$gateway = $this->getMockBuilder('PaymentGateway')
            ->setMethods(['transfer'])
            ->getMock();

I got this warning:

Method 'setMethods' is deprecated

How can I resolve this deprecation?

Aucun commentaire:

Enregistrer un commentaire