summaryrefslogtreecommitdiffstats
path: root/Tests/Core/LegacySecurityContextInterfaceTest.php
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2015-01-05 15:29:53 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2015-01-05 15:29:53 +0100
commit79471f92de28ed0acf9cce11051ebc47964acfbb (patch)
tree702963c8c829cda73762be39f2250ff7a16eb724 /Tests/Core/LegacySecurityContextInterfaceTest.php
parentc7f654d74131094b02c247373982d6f9b4287dfa (diff)
parent887bcdd527e7a428d5073db41213d18cdc10b8ef (diff)
downloadsymfony-security-79471f92de28ed0acf9cce11051ebc47964acfbb.zip
symfony-security-79471f92de28ed0acf9cce11051ebc47964acfbb.tar.gz
symfony-security-79471f92de28ed0acf9cce11051ebc47964acfbb.tar.bz2
Merge branch '2.6' into 2.7
* 2.6: [2.6] cleanup deprecated uses [2.5] cleanup deprecated uses Conflicts: src/Symfony/Component/Form/composer.json src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php
Diffstat (limited to 'Tests/Core/LegacySecurityContextInterfaceTest.php')
-rw-r--r--Tests/Core/LegacySecurityContextInterfaceTest.php30
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..764a43d
--- /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);
+ }
+}