mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 09:34:59 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -23,10 +23,10 @@ use Doctrine\Persistence\ObjectRepository;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Prophecy\Argument;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class IdToEntityDataTransformerTest extends TestCase
|
||||
@@ -35,8 +35,8 @@ final class IdToEntityDataTransformerTest extends TestCase
|
||||
|
||||
public function testReverseTransformMulti()
|
||||
{
|
||||
$o1 = new stdClass();
|
||||
$o2 = new stdClass();
|
||||
$o1 = new \stdClass();
|
||||
$o2 = new \stdClass();
|
||||
|
||||
$repository = $this->prophesize(ObjectRepository::class);
|
||||
$repository->findOneBy(Argument::exact(['id' => 1]))->willReturn($o1);
|
||||
@@ -58,7 +58,7 @@ final class IdToEntityDataTransformerTest extends TestCase
|
||||
|
||||
public function testReverseTransformSingle()
|
||||
{
|
||||
$o = new stdClass();
|
||||
$o = new \stdClass();
|
||||
|
||||
$repository = $this->prophesize(ObjectRepository::class);
|
||||
$repository->findOneBy(Argument::exact(['id' => 1]))->willReturn($o);
|
||||
|
@@ -20,6 +20,7 @@ use Symfony\Component\Form\Test\TypeTestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class PickCenterTypeTest extends TypeTestCase
|
||||
@@ -31,7 +32,7 @@ final class PickCenterTypeTest extends TypeTestCase
|
||||
public function testUserCanReachMultipleCenters(): never
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
//prepare user
|
||||
// prepare user
|
||||
$centerA = $this->prepareCenter(1, 'centerA');
|
||||
$centerB = $this->prepareCenter(2, 'centerB');
|
||||
$groupCenterA = (new GroupCenter())
|
||||
@@ -54,7 +55,7 @@ final class PickCenterTypeTest extends TypeTestCase
|
||||
public function testUserCanReachMultipleSameCenter(): never
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
//prepare user
|
||||
// prepare user
|
||||
$center = $this->prepareCenter(1, 'center');
|
||||
$groupCenterA = (new GroupCenter())
|
||||
->setCenter($center);
|
||||
@@ -76,7 +77,7 @@ final class PickCenterTypeTest extends TypeTestCase
|
||||
public function testUserCanReachSingleCenter(): never
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
//prepare user
|
||||
// prepare user
|
||||
$center = $this->prepareCenter(1, 'center');
|
||||
$groupCenter = (new GroupCenter())
|
||||
->setCenter($center);
|
||||
@@ -91,7 +92,7 @@ final class PickCenterTypeTest extends TypeTestCase
|
||||
/**
|
||||
* prepare a mocked center, with and id and name given.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @param string $name
|
||||
*
|
||||
* @return \Chill\MainBundle\Entity\Center
|
||||
@@ -101,7 +102,7 @@ final class PickCenterTypeTest extends TypeTestCase
|
||||
$prophet = new \Prophecy\Prophet();
|
||||
|
||||
$prophecyCenter = $prophet->prophesize();
|
||||
$prophecyCenter->willExtend('\\' . \Chill\MainBundle\Entity\Center::class);
|
||||
$prophecyCenter->willExtend('\\'.\Chill\MainBundle\Entity\Center::class);
|
||||
$prophecyCenter->getId()->willReturn($id);
|
||||
$prophecyCenter->getName()->willReturn($name);
|
||||
|
||||
@@ -119,7 +120,7 @@ final class PickCenterTypeTest extends TypeTestCase
|
||||
{
|
||||
$prophet = new \Prophecy\Prophet();
|
||||
|
||||
//create a center transformer
|
||||
// create a center transformer
|
||||
$centerTransformerProphecy = $prophet->prophesize();
|
||||
$centerTransformerProphecy
|
||||
->willExtend(\Chill\MainBundle\Form\Type\DataTransformer\CenterTransformer::class);
|
||||
@@ -127,7 +128,7 @@ final class PickCenterTypeTest extends TypeTestCase
|
||||
|
||||
$tokenProphecy = $prophet->prophesize();
|
||||
$tokenProphecy
|
||||
->willImplement('\\' . \Symfony\Component\Security\Core\Authentication\Token\TokenInterface::class);
|
||||
->willImplement('\\'.\Symfony\Component\Security\Core\Authentication\Token\TokenInterface::class);
|
||||
$tokenProphecy->getUser()->willReturn($user);
|
||||
$token = $tokenProphecy->reveal();
|
||||
|
||||
|
@@ -17,13 +17,13 @@ use Chill\MainBundle\Form\Type\PickPostalCodeType;
|
||||
use Chill\MainBundle\Repository\PostalCodeRepositoryInterface;
|
||||
use Prophecy\Argument;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use ReflectionClass;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||
use Symfony\Component\Form\PreloadedExtension;
|
||||
use Symfony\Component\Form\Test\TypeTestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class PickPostalCodeTypeTest extends TypeTestCase
|
||||
@@ -49,7 +49,7 @@ final class PickPostalCodeTypeTest extends TypeTestCase
|
||||
$postalCodeRepository->find(Argument::any())
|
||||
->will(static function ($args) {
|
||||
$postalCode = new PostalCode();
|
||||
$reflectionClass = new ReflectionClass($postalCode);
|
||||
$reflectionClass = new \ReflectionClass($postalCode);
|
||||
$id = $reflectionClass->getProperty('id');
|
||||
$id->setAccessible(true);
|
||||
$id->setValue($postalCode, (int) $args[0]);
|
||||
|
@@ -18,6 +18,7 @@ use Symfony\Component\Form\Test\TypeTestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class PickRollingDateTypeTest extends TypeTestCase
|
||||
|
@@ -31,6 +31,7 @@ use Symfony\Component\Security\Core\Security;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ScopePickerTypeTest extends TypeTestCase
|
||||
|
Reference in New Issue
Block a user