Commit 77f40d18 authored by RoSk0's avatar RoSk0

DOn't use deprecated PHPUnit\Framework\TestCase::getMock() method.

parent ef115dc3
......@@ -51,7 +51,7 @@ class CrmCoreUserSyncRelationRulesTest extends UnitTestCase {
->willReturn($rules);
$config_name = 'crm_core_user_sync.settings';
$configFactory = $this->getMock(ConfigFactoryInterface::class);
$configFactory = $this->createMock(ConfigFactoryInterface::class);
$configFactory
->expects($this->once())
->method('get')
......@@ -65,25 +65,25 @@ class CrmCoreUserSyncRelationRulesTest extends UnitTestCase {
* Tests CrmCoreUserSyncRelationRules service.
*/
public function testCrmCoreUserSyncRelationRulesService() {
$account_authenticated = $this->getMock(UserInterface::class);
$account_authenticated = $this->createMock(UserInterface::class);
$account_authenticated
->expects($this->any())
->method('hasRole')
->willReturnMap([['authenticated', TRUE], ['customer', FALSE]]);
$account_customer = $this->getMock(UserInterface::class);
$account_customer = $this->createMock(UserInterface::class);
$account_customer
->expects($this->any())
->method('hasRole')
->willReturnMap([['authenticated', FALSE], ['customer', TRUE]]);
$contact_individual = $this->getMock(IndividualInterface::class);
$contact_individual = $this->createMock(IndividualInterface::class);
$contact_individual
->expects($this->any())
->method('bundle')
->willReturn('individual');
$contact_customer = $this->getMock(IndividualInterface::class);
$contact_customer = $this->createMock(IndividualInterface::class);
$contact_customer
->expects($this->any())
->method('bundle')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment