"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/SimpleAuthenticationProviderTest.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

SimpleAuthenticationProviderTest.php  (phplist-3.4.5.tgz):SimpleAuthenticationProviderTest.php  (phplist-3.4.6.tgz)
skipping to change at line 22 skipping to change at line 22
namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; namespace Symfony\Component\Security\Core\Tests\Authentication\Provider;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\Authentication\Provider\SimpleAuthentication Provider; use Symfony\Component\Security\Core\Authentication\Provider\SimpleAuthentication Provider;
use Symfony\Component\Security\Core\Exception\DisabledException; use Symfony\Component\Security\Core\Exception\DisabledException;
use Symfony\Component\Security\Core\Exception\LockedException; use Symfony\Component\Security\Core\Exception\LockedException;
use Symfony\Component\Security\Core\User\UserChecker; use Symfony\Component\Security\Core\User\UserChecker;
class SimpleAuthenticationProviderTest extends TestCase class SimpleAuthenticationProviderTest extends TestCase
{ {
/**
* @expectedException \Symfony\Component\Security\Core\Exception\DisabledExc
eption
*/
public function testAuthenticateWhenPreChecksFails() public function testAuthenticateWhenPreChecksFails()
{ {
$this->expectException('Symfony\Component\Security\Core\Exception\Disabl edException');
$user = $this->getMockBuilder('Symfony\Component\Security\Core\User\User Interface')->getMock(); $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\User Interface')->getMock();
$token = $this->getMockBuilder('Symfony\Component\Security\Core\Authenti cation\Token\TokenInterface')->getMock(); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authenti cation\Token\TokenInterface')->getMock();
$token->expects($this->any()) $token->expects($this->any())
->method('getUser') ->method('getUser')
->willReturn($user); ->willReturn($user);
$userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\Us er\UserCheckerInterface')->getMock(); $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\Us er\UserCheckerInterface')->getMock();
$userChecker->expects($this->once()) $userChecker->expects($this->once())
->method('checkPreAuth') ->method('checkPreAuth')
skipping to change at line 49 skipping to change at line 47
$authenticator = $this->getMockBuilder('Symfony\Component\Security\Core\ Authentication\SimpleAuthenticatorInterface')->getMock(); $authenticator = $this->getMockBuilder('Symfony\Component\Security\Core\ Authentication\SimpleAuthenticatorInterface')->getMock();
$authenticator->expects($this->once()) $authenticator->expects($this->once())
->method('authenticateToken') ->method('authenticateToken')
->willReturn($token); ->willReturn($token);
$provider = $this->getProvider($authenticator, null, $userChecker); $provider = $this->getProvider($authenticator, null, $userChecker);
$provider->authenticate($token); $provider->authenticate($token);
} }
/**
* @expectedException \Symfony\Component\Security\Core\Exception\LockedExcep
tion
*/
public function testAuthenticateWhenPostChecksFails() public function testAuthenticateWhenPostChecksFails()
{ {
$this->expectException('Symfony\Component\Security\Core\Exception\Locked Exception');
$user = $this->getMockBuilder('Symfony\Component\Security\Core\User\User Interface')->getMock(); $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\User Interface')->getMock();
$token = $this->getMockBuilder('Symfony\Component\Security\Core\Authenti cation\Token\TokenInterface')->getMock(); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authenti cation\Token\TokenInterface')->getMock();
$token->expects($this->any()) $token->expects($this->any())
->method('getUser') ->method('getUser')
->willReturn($user); ->willReturn($user);
$userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\Us er\UserCheckerInterface')->getMock(); $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\Us er\UserCheckerInterface')->getMock();
$userChecker->expects($this->once()) $userChecker->expects($this->once())
->method('checkPostAuth') ->method('checkPostAuth')
 End of changes. 4 change blocks. 
8 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)