"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/AddSecurityVotersPassTest.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).

AddSecurityVotersPassTest.php  (phplist-3.4.5.tgz):AddSecurityVotersPassTest.php  (phplist-3.4.6.tgz)
skipping to change at line 24 skipping to change at line 24
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddSecurityVoters Pass; use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddSecurityVoters Pass;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Exception\LogicException; use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager; use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
use Symfony\Component\Security\Core\Authorization\Voter\Voter; use Symfony\Component\Security\Core\Authorization\Voter\Voter;
class AddSecurityVotersPassTest extends TestCase class AddSecurityVotersPassTest extends TestCase
{ {
/**
* @expectedException \Symfony\Component\DependencyInjection\Exception\Logic
Exception
*/
public function testNoVoters() public function testNoVoters()
{ {
$this->expectException('Symfony\Component\DependencyInjection\Exception\ LogicException');
$container = new ContainerBuilder(); $container = new ContainerBuilder();
$container $container
->register('security.access.decision_manager', AccessDecisionManager ::class) ->register('security.access.decision_manager', AccessDecisionManager ::class)
->addArgument([]) ->addArgument([])
; ;
$compilerPass = new AddSecurityVotersPass(); $compilerPass = new AddSecurityVotersPass();
$compilerPass->process($container); $compilerPass->process($container);
} }
skipping to change at line 104 skipping to change at line 102
} }
/** /**
* @group legacy * @group legacy
*/ */
public function testVoterMissingInterfaceAndMethod() public function testVoterMissingInterfaceAndMethod()
{ {
$exception = LogicException::class; $exception = LogicException::class;
$message = 'stdClass should implement the Symfony\Component\Security\Cor e\Authorization\Voter\VoterInterface interface when used as voter.'; $message = 'stdClass should implement the Symfony\Component\Security\Cor e\Authorization\Voter\VoterInterface interface when used as voter.';
if (method_exists($this, 'expectException')) { $this->expectException($exception);
$this->expectException($exception); $this->expectExceptionMessage($message);
$this->expectExceptionMessage($message);
} else {
$this->setExpectedException($exception, $message);
}
$container = new ContainerBuilder(); $container = new ContainerBuilder();
$container $container
->register('security.access.decision_manager', AccessDecisionManager ::class) ->register('security.access.decision_manager', AccessDecisionManager ::class)
->addArgument([]) ->addArgument([])
; ;
$container $container
->register('without_method', 'stdClass') ->register('without_method', 'stdClass')
->addTag('security.voter') ->addTag('security.voter')
; ;
 End of changes. 3 change blocks. 
10 lines changed or deleted 3 lines changed or added

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