mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Validator\Person;
|
||||
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcher;
|
||||
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcherInterface;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenter;
|
||||
@@ -13,6 +19,10 @@ use Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenterValidator;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase
|
||||
{
|
||||
public function testValidateRequired()
|
||||
@@ -30,13 +40,6 @@ class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase
|
||||
->assertRaised();
|
||||
}
|
||||
|
||||
protected function getConstraint()
|
||||
{
|
||||
return new PersonHasCenter([
|
||||
'message' => 'msg'
|
||||
]);
|
||||
}
|
||||
|
||||
protected function createValidator()
|
||||
{
|
||||
$parameterBag = $this->createMock(ParameterBagInterface::class);
|
||||
@@ -45,12 +48,19 @@ class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase
|
||||
->with($this->equalTo('chill_person'))
|
||||
->willReturn([
|
||||
'validation' => [
|
||||
'center_required' => true
|
||||
]
|
||||
'center_required' => true,
|
||||
],
|
||||
]);
|
||||
|
||||
$centerResolverDispatcher = $this->createMock(CenterResolverDispatcherInterface::class);
|
||||
|
||||
return new PersonHasCenterValidator($parameterBag, $centerResolverDispatcher);
|
||||
}
|
||||
|
||||
protected function getConstraint()
|
||||
{
|
||||
return new PersonHasCenter([
|
||||
'message' => 'msg',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user