diff --git a/src/Symfony/Bridge/Doctrine/phpunit.xml.dist b/src/Symfony/Bridge/Doctrine/phpunit.xml.dist index f7f3d49ac0..5dfeedc2b1 100644 --- a/src/Symfony/Bridge/Doctrine/phpunit.xml.dist +++ b/src/Symfony/Bridge/Doctrine/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="Tests/bootstrap.php" > + + + + ./Tests/ diff --git a/src/Symfony/Bridge/Monolog/phpunit.xml.dist b/src/Symfony/Bridge/Monolog/phpunit.xml.dist index 1afee95c4e..528e310c88 100644 --- a/src/Symfony/Bridge/Monolog/phpunit.xml.dist +++ b/src/Symfony/Bridge/Monolog/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Bridge/Propel1/phpunit.xml.dist b/src/Symfony/Bridge/Propel1/phpunit.xml.dist index a2e9ba2b93..eca99132e4 100644 --- a/src/Symfony/Bridge/Propel1/phpunit.xml.dist +++ b/src/Symfony/Bridge/Propel1/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Bridge/ProxyManager/phpunit.xml.dist b/src/Symfony/Bridge/ProxyManager/phpunit.xml.dist index 0314075d3c..d55b9bfcfd 100644 --- a/src/Symfony/Bridge/ProxyManager/phpunit.xml.dist +++ b/src/Symfony/Bridge/ProxyManager/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Bridge/Twig/phpunit.xml.dist b/src/Symfony/Bridge/Twig/phpunit.xml.dist index 645101a5b8..d74b960a60 100644 --- a/src/Symfony/Bridge/Twig/phpunit.xml.dist +++ b/src/Symfony/Bridge/Twig/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist b/src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist index e01faa1316..30481767b2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist +++ b/src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist b/src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist index ffad320be5..07e43b107d 100644 --- a/src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist +++ b/src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist @@ -6,7 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > - + + + + ./Tests/ diff --git a/src/Symfony/Bundle/TwigBundle/phpunit.xml.dist b/src/Symfony/Bundle/TwigBundle/phpunit.xml.dist index 67921d2bea..10d1ffa927 100644 --- a/src/Symfony/Bundle/TwigBundle/phpunit.xml.dist +++ b/src/Symfony/Bundle/TwigBundle/phpunit.xml.dist @@ -6,7 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > - + + + + ./Tests/ diff --git a/src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist b/src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist index 712fa0b308..86602baa69 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist +++ b/src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist @@ -6,7 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > - + + + + ./Tests/ diff --git a/src/Symfony/Component/BrowserKit/phpunit.xml.dist b/src/Symfony/Component/BrowserKit/phpunit.xml.dist index 51a0f31d18..78f8da9de6 100644 --- a/src/Symfony/Component/BrowserKit/phpunit.xml.dist +++ b/src/Symfony/Component/BrowserKit/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/ClassLoader/phpunit.xml.dist b/src/Symfony/Component/ClassLoader/phpunit.xml.dist index 3602188f09..4495798930 100644 --- a/src/Symfony/Component/ClassLoader/phpunit.xml.dist +++ b/src/Symfony/Component/ClassLoader/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Config/phpunit.xml.dist b/src/Symfony/Component/Config/phpunit.xml.dist index 9b13467ddb..725692e253 100644 --- a/src/Symfony/Component/Config/phpunit.xml.dist +++ b/src/Symfony/Component/Config/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Console/phpunit.xml.dist b/src/Symfony/Component/Console/phpunit.xml.dist index 13e0f33748..f4831ecb85 100644 --- a/src/Symfony/Component/Console/phpunit.xml.dist +++ b/src/Symfony/Component/Console/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/CssSelector/phpunit.xml.dist b/src/Symfony/Component/CssSelector/phpunit.xml.dist index 3eb0a1ece0..7f88533151 100644 --- a/src/Symfony/Component/CssSelector/phpunit.xml.dist +++ b/src/Symfony/Component/CssSelector/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Debug/phpunit.xml.dist b/src/Symfony/Component/Debug/phpunit.xml.dist index 2a8cb8143e..269ca991b7 100644 --- a/src/Symfony/Component/Debug/phpunit.xml.dist +++ b/src/Symfony/Component/Debug/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/DependencyInjection/phpunit.xml.dist b/src/Symfony/Component/DependencyInjection/phpunit.xml.dist index d636cde6dc..10e67fcebf 100644 --- a/src/Symfony/Component/DependencyInjection/phpunit.xml.dist +++ b/src/Symfony/Component/DependencyInjection/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/DomCrawler/phpunit.xml.dist b/src/Symfony/Component/DomCrawler/phpunit.xml.dist index 9be3b45ab1..5ce15ec602 100644 --- a/src/Symfony/Component/DomCrawler/phpunit.xml.dist +++ b/src/Symfony/Component/DomCrawler/phpunit.xml.dist @@ -6,6 +6,11 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + + ./Tests/ diff --git a/src/Symfony/Component/EventDispatcher/phpunit.xml.dist b/src/Symfony/Component/EventDispatcher/phpunit.xml.dist index cca1259b37..9a7728e90d 100644 --- a/src/Symfony/Component/EventDispatcher/phpunit.xml.dist +++ b/src/Symfony/Component/EventDispatcher/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Filesystem/phpunit.xml.dist b/src/Symfony/Component/Filesystem/phpunit.xml.dist index 790283551c..c5b7cb5ee2 100644 --- a/src/Symfony/Component/Filesystem/phpunit.xml.dist +++ b/src/Symfony/Component/Filesystem/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Finder/phpunit.xml.dist b/src/Symfony/Component/Finder/phpunit.xml.dist index ccef55ac46..0ed1223c20 100644 --- a/src/Symfony/Component/Finder/phpunit.xml.dist +++ b/src/Symfony/Component/Finder/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Form/phpunit.xml.dist b/src/Symfony/Component/Form/phpunit.xml.dist index bd91d7b831..7ddac030f7 100644 --- a/src/Symfony/Component/Form/phpunit.xml.dist +++ b/src/Symfony/Component/Form/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/HttpFoundation/phpunit.xml.dist b/src/Symfony/Component/HttpFoundation/phpunit.xml.dist index bbc5dc6dc8..1c6739377c 100644 --- a/src/Symfony/Component/HttpFoundation/phpunit.xml.dist +++ b/src/Symfony/Component/HttpFoundation/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/HttpKernel/phpunit.xml.dist b/src/Symfony/Component/HttpKernel/phpunit.xml.dist index f572ab27d3..cbfaa9f597 100644 --- a/src/Symfony/Component/HttpKernel/phpunit.xml.dist +++ b/src/Symfony/Component/HttpKernel/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Intl/phpunit.xml.dist b/src/Symfony/Component/Intl/phpunit.xml.dist index 1ae328048b..7d601b27f4 100644 --- a/src/Symfony/Component/Intl/phpunit.xml.dist +++ b/src/Symfony/Component/Intl/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Locale/phpunit.xml.dist b/src/Symfony/Component/Locale/phpunit.xml.dist index c72b2438a8..b526bd5915 100644 --- a/src/Symfony/Component/Locale/phpunit.xml.dist +++ b/src/Symfony/Component/Locale/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/OptionsResolver/phpunit.xml.dist b/src/Symfony/Component/OptionsResolver/phpunit.xml.dist index 42fa6df152..41c786c8c4 100644 --- a/src/Symfony/Component/OptionsResolver/phpunit.xml.dist +++ b/src/Symfony/Component/OptionsResolver/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Process/phpunit.xml.dist b/src/Symfony/Component/Process/phpunit.xml.dist index fcb230a062..8f147bca73 100644 --- a/src/Symfony/Component/Process/phpunit.xml.dist +++ b/src/Symfony/Component/Process/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/PropertyAccess/phpunit.xml.dist b/src/Symfony/Component/PropertyAccess/phpunit.xml.dist index cd114f81e8..c71eb65093 100644 --- a/src/Symfony/Component/PropertyAccess/phpunit.xml.dist +++ b/src/Symfony/Component/PropertyAccess/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Routing/phpunit.xml.dist b/src/Symfony/Component/Routing/phpunit.xml.dist index 8cf6352f3a..4144e73266 100644 --- a/src/Symfony/Component/Routing/phpunit.xml.dist +++ b/src/Symfony/Component/Routing/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php deleted file mode 100644 index 8b3eb53a2c..0000000000 --- a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php +++ /dev/null @@ -1,168 +0,0 @@ - - * - * 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\Validator\Constraints; - -use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; -use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; -use Symfony\Component\Security\Core\SecurityContextInterface; -use Symfony\Component\Security\Core\Validator\Constraints\UserPassword; -use Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator; -use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest; - -/** - * @author Bernhard Schussek - */ -class UserPasswordValidatorTest extends AbstractConstraintValidatorTest -{ - const PASSWORD = 's3Cr3t'; - - const SALT = '^S4lt$'; - - /** - * @var SecurityContextInterface - */ - protected $securityContext; - - /** - * @var PasswordEncoderInterface - */ - protected $encoder; - - /** - * @var EncoderFactoryInterface - */ - protected $encoderFactory; - - protected function createValidator() - { - return new UserPasswordValidator($this->securityContext, $this->encoderFactory); - } - - protected function setUp() - { - $user = $this->createUser(); - $this->securityContext = $this->createSecurityContext($user); - $this->encoder = $this->createPasswordEncoder(); - $this->encoderFactory = $this->createEncoderFactory($this->encoder); - - parent::setUp(); - } - - public function testPasswordIsValid() - { - $constraint = new UserPassword(array( - 'message' => 'myMessage', - )); - - $this->encoder->expects($this->once()) - ->method('isPasswordValid') - ->with(static::PASSWORD, 'secret', static::SALT) - ->will($this->returnValue(true)); - - $this->validator->validate('secret', $constraint); - - $this->assertNoViolation(); - } - - public function testPasswordIsNotValid() - { - $constraint = new UserPassword(array( - 'message' => 'myMessage', - )); - - $this->encoder->expects($this->once()) - ->method('isPasswordValid') - ->with(static::PASSWORD, 'secret', static::SALT) - ->will($this->returnValue(false)); - - $this->validator->validate('secret', $constraint); - - $this->assertViolation('myMessage'); - } - - /** - * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException - */ - public function testUserIsNotValid() - { - $user = $this->getMock('Foo\Bar\User'); - - $this->securityContext = $this->createSecurityContext($user); - $this->validator = $this->createValidator(); - $this->validator->initialize($this->context); - - $this->validator->validate('secret', new UserPassword()); - } - - protected function createUser() - { - $mock = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); - - $mock - ->expects($this->any()) - ->method('getPassword') - ->will($this->returnValue(static::PASSWORD)) - ; - - $mock - ->expects($this->any()) - ->method('getSalt') - ->will($this->returnValue(static::SALT)) - ; - - return $mock; - } - - protected function createPasswordEncoder($isPasswordValid = true) - { - return $this->getMock('Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface'); - } - - protected function createEncoderFactory($encoder = null) - { - $mock = $this->getMock('Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface'); - - $mock - ->expects($this->any()) - ->method('getEncoder') - ->will($this->returnValue($encoder)) - ; - - return $mock; - } - - protected function createSecurityContext($user = null) - { - $token = $this->createAuthenticationToken($user); - - $mock = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'); - $mock - ->expects($this->any()) - ->method('getToken') - ->will($this->returnValue($token)) - ; - - return $mock; - } - - protected function createAuthenticationToken($user = null) - { - $mock = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); - $mock - ->expects($this->any()) - ->method('getUser') - ->will($this->returnValue($user)) - ; - - return $mock; - } -} diff --git a/src/Symfony/Component/Security/phpunit.xml.dist b/src/Symfony/Component/Security/phpunit.xml.dist index 9c53c60896..1f1ff85fe6 100644 --- a/src/Symfony/Component/Security/phpunit.xml.dist +++ b/src/Symfony/Component/Security/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Serializer/phpunit.xml.dist b/src/Symfony/Component/Serializer/phpunit.xml.dist index aa28252cab..0327a9b9d1 100644 --- a/src/Symfony/Component/Serializer/phpunit.xml.dist +++ b/src/Symfony/Component/Serializer/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Stopwatch/phpunit.xml.dist b/src/Symfony/Component/Stopwatch/phpunit.xml.dist index 1795afc19a..ebbfd7bd51 100644 --- a/src/Symfony/Component/Stopwatch/phpunit.xml.dist +++ b/src/Symfony/Component/Stopwatch/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Templating/phpunit.xml.dist b/src/Symfony/Component/Templating/phpunit.xml.dist index fcb78e17e4..1bdb101a7f 100644 --- a/src/Symfony/Component/Templating/phpunit.xml.dist +++ b/src/Symfony/Component/Templating/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Translation/phpunit.xml.dist b/src/Symfony/Component/Translation/phpunit.xml.dist index 6392d3d557..767178d356 100644 --- a/src/Symfony/Component/Translation/phpunit.xml.dist +++ b/src/Symfony/Component/Translation/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Validator/phpunit.xml.dist b/src/Symfony/Component/Validator/phpunit.xml.dist index 3713ca85ad..c02d118721 100644 --- a/src/Symfony/Component/Validator/phpunit.xml.dist +++ b/src/Symfony/Component/Validator/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/ diff --git a/src/Symfony/Component/Yaml/phpunit.xml.dist b/src/Symfony/Component/Yaml/phpunit.xml.dist index 90e0bcc27e..39c04ce3a6 100644 --- a/src/Symfony/Component/Yaml/phpunit.xml.dist +++ b/src/Symfony/Component/Yaml/phpunit.xml.dist @@ -6,6 +6,10 @@ colors="true" bootstrap="vendor/autoload.php" > + + + + ./Tests/