minor #15893 Merged LegacySecurityContext tests (WouterJ)

This PR was merged into the 2.8 branch.

Discussion
----------

Merged LegacySecurityContext tests

I've no idea why this test was introduced in the wrong namespace in 2.8, but I merged it in the correct test case now.

Commits
-------

2c4da3c Merged LegacySecurityContext tests
This commit is contained in:
Fabien Potencier 2015-09-26 09:34:51 +02:00
commit 8209754e4e
2 changed files with 10 additions and 31 deletions

View File

@ -1,31 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Security\Core\Tests;
use Symfony\Component\Security\Core\SecurityContextInterface;
use Symfony\Component\Security\Core\Security;
/**
* @group legacy
*/
class LegacySecurityContextInterfaceTest extends \PHPUnit_Framework_TestCase
{
/**
* Test if the BC Layer is working as intended.
*/
public function testConstantSync()
{
$this->assertSame(Security::ACCESS_DENIED_ERROR, SecurityContextInterface::ACCESS_DENIED_ERROR);
$this->assertSame(Security::AUTHENTICATION_ERROR, SecurityContextInterface::AUTHENTICATION_ERROR);
$this->assertSame(Security::LAST_USERNAME, SecurityContextInterface::LAST_USERNAME);
}
}

View File

@ -119,4 +119,14 @@ class LegacySecurityContextTest extends \PHPUnit_Framework_TestCase
array(true, null),
);
}
/**
* Test if the BC Layer is working as intended.
*/
public function testConstantSync()
{
$this->assertSame(Security::ACCESS_DENIED_ERROR, SecurityContextInterface::ACCESS_DENIED_ERROR);
$this->assertSame(Security::AUTHENTICATION_ERROR, SecurityContextInterface::AUTHENTICATION_ERROR);
$this->assertSame(Security::LAST_USERNAME, SecurityContextInterface::LAST_USERNAME);
}
}