Skip to content

Commit b384652

Browse files
committed
don't disable constructor calls to mockups of classes that extend internal PHP classes
1 parent 1fbe80d commit b384652

5 files changed

+10
-10
lines changed

Tests/Authentication/AuthenticationProviderManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ protected function getAuthenticationProvider($supports, $token = null, $exceptio
129129
} elseif (null !== $exception) {
130130
$provider->expects($this->once())
131131
->method('authenticate')
132-
->will($this->throwException($this->getMock($exception, null, array(), '', false)))
132+
->will($this->throwException($this->getMock($exception, null, array(), '')))
133133
;
134134
}
135135

Tests/Authentication/Provider/DaoAuthenticationProviderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testRetrieveUserWhenUsernameIsNotFound()
3737
$userProvider = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface');
3838
$userProvider->expects($this->once())
3939
->method('loadUserByUsername')
40-
->will($this->throwException($this->getMock('Symfony\\Component\\Security\\Core\\Exception\\UsernameNotFoundException', null, array(), '', false)))
40+
->will($this->throwException($this->getMock('Symfony\\Component\\Security\\Core\\Exception\\UsernameNotFoundException', null, array(), '')))
4141
;
4242

4343
$provider = new DaoAuthenticationProvider($userProvider, $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface'), 'key', $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface'));
@@ -55,7 +55,7 @@ public function testRetrieveUserWhenAnExceptionOccurs()
5555
$userProvider = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface');
5656
$userProvider->expects($this->once())
5757
->method('loadUserByUsername')
58-
->will($this->throwException($this->getMock('RuntimeException', null, array(), '', false)))
58+
->will($this->throwException($this->getMock('RuntimeException', null, array(), '')))
5959
;
6060

6161
$provider = new DaoAuthenticationProvider($userProvider, $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface'), 'key', $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface'));

Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function testAuthenticateWhenUserCheckerThrowsException()
7979
$userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface');
8080
$userChecker->expects($this->once())
8181
->method('checkPostAuth')
82-
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\LockedException', null, array(), '', false)))
82+
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\LockedException', null, array(), '')))
8383
;
8484

8585
$provider = $this->getProvider($user, $userChecker);

Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testAuthenticateWhenPostChecksFails()
5252
$userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface');
5353
$userChecker->expects($this->once())
5454
->method('checkPostAuth')
55-
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\AccountExpiredException', null, array(), '', false)))
55+
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\AccountExpiredException', null, array(), '')))
5656
;
5757

5858
$provider = $this->getProvider($userChecker);

Tests/Authentication/Provider/UserAuthenticationProviderTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testAuthenticateWhenUsernameIsNotFound()
4141
$provider = $this->getProvider(false, false);
4242
$provider->expects($this->once())
4343
->method('retrieveUser')
44-
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\UsernameNotFoundException', null, array(), '', false)))
44+
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\UsernameNotFoundException', null, array(), '')))
4545
;
4646

4747
$provider->authenticate($this->getSupportedToken());
@@ -55,7 +55,7 @@ public function testAuthenticateWhenUsernameIsNotFoundAndHideIsTrue()
5555
$provider = $this->getProvider(false, true);
5656
$provider->expects($this->once())
5757
->method('retrieveUser')
58-
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\UsernameNotFoundException', null, array(), '', false)))
58+
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\UsernameNotFoundException', null, array(), '')))
5959
;
6060

6161
$provider->authenticate($this->getSupportedToken());
@@ -83,7 +83,7 @@ public function testAuthenticateWhenPreChecksFails()
8383
$userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface');
8484
$userChecker->expects($this->once())
8585
->method('checkPreAuth')
86-
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\CredentialsExpiredException', null, array(), '', false)))
86+
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\CredentialsExpiredException', null, array(), '')))
8787
;
8888

8989
$provider = $this->getProvider($userChecker);
@@ -103,7 +103,7 @@ public function testAuthenticateWhenPostChecksFails()
103103
$userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface');
104104
$userChecker->expects($this->once())
105105
->method('checkPostAuth')
106-
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\AccountExpiredException', null, array(), '', false)))
106+
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\AccountExpiredException', null, array(), '')))
107107
;
108108

109109
$provider = $this->getProvider($userChecker);
@@ -128,7 +128,7 @@ public function testAuthenticateWhenPostCheckAuthenticationFails()
128128
;
129129
$provider->expects($this->once())
130130
->method('checkAuthentication')
131-
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\BadCredentialsException', null, array(), '', false)))
131+
->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\BadCredentialsException', null, array(), '')))
132132
;
133133

134134
$provider->authenticate($this->getSupportedToken());

0 commit comments

Comments
 (0)