From: Fabien Potencier <fabien.potencier@gmail.com>
Date: Mon, 19 Dec 2016 10:02:29 +0100
Subject: fixed obsolete getMock() usage

Origin: backport, https://github.com/symfony/security-acl/commit/3a510c7919d2d5bd12caeec9bdfb1cd6c0343d25
Bug-Debian: https://bugs.debian.org/882924
Bug: https://github.com/symfony/security-acl/issues/59
Forwarded: https://github.com/symfony/security-acl/pull/61
---
 Tests/Dbal/MutableAclProviderTest.php                  | 2 +-
 Tests/Domain/SecurityIdentityRetrievalStrategyTest.php | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Tests/Dbal/MutableAclProviderTest.php b/Tests/Dbal/MutableAclProviderTest.php
index 8cd4502..103b030 100644
--- a/Tests/Dbal/MutableAclProviderTest.php
+++ b/Tests/Dbal/MutableAclProviderTest.php
@@ -252,7 +252,7 @@ class MutableAclProviderTest extends \PHPUnit\Framework\TestCase
 
     public function testUpdateDoesNothingWhenThereAreNoChanges()
     {
-        $con = $this->getMock('Doctrine\DBAL\Connection', [], [], '', false);
+        $con = $this->getMockBuilder('Doctrine\DBAL\Connection')->disableOriginalConstructor()->getMock();
         $con
             ->expects($this->never())
             ->method('beginTransaction')
diff --git a/Tests/Domain/SecurityIdentityRetrievalStrategyTest.php b/Tests/Domain/SecurityIdentityRetrievalStrategyTest.php
index 13cd390..76cad54 100644
--- a/Tests/Domain/SecurityIdentityRetrievalStrategyTest.php
+++ b/Tests/Domain/SecurityIdentityRetrievalStrategyTest.php
@@ -122,7 +122,7 @@ class SecurityIdentityRetrievalStrategyTest extends \PHPUnit\Framework\TestCase
 
     protected function getAccount($username, $class)
     {
-        $account = $this->getMock('Symfony\Component\Security\Core\User\UserInterface', [], [], $class);
+        $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->setMockClassName($class)->getMock();
         $account
             ->expects($this->any())
             ->method('getUsername')
@@ -158,7 +158,7 @@ class SecurityIdentityRetrievalStrategyTest extends \PHPUnit\Framework\TestCase
                 ->willReturn($roles);
         }
 
-        $trustResolver = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface', [], ['', '']);
+        $trustResolver = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface')->getMock();
 
         $trustResolver
             ->expects($this->at(0))
