diff options
Diffstat (limited to 'Tests/Core/LegacySecurityContextInterfaceTest.php')
-rw-r--r-- | Tests/Core/LegacySecurityContextInterfaceTest.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Tests/Core/LegacySecurityContextInterfaceTest.php b/Tests/Core/LegacySecurityContextInterfaceTest.php new file mode 100644 index 0000000..8f68475 --- /dev/null +++ b/Tests/Core/LegacySecurityContextInterfaceTest.php @@ -0,0 +1,30 @@ +<?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\Tests\Core; + +use Symfony\Component\Security\Core\SecurityContextInterface; +use Symfony\Component\Security\Core\Security; + +class LegacySecurityContextInterfaceTest extends \PHPUnit_Framework_TestCase +{ + /** + * Test if the BC Layer is working as intended + */ + public function testConstantSync() + { + $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); + + $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); + } +} |