mirror of
https://github.com/symfony/maker-bundle.git
synced 2026-03-24 07:52:17 +01:00
extending php-cs to the tests/ directory
This commit is contained in:
@@ -5,7 +5,10 @@ if (!file_exists(__DIR__.'/src')) {
|
||||
}
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in(__DIR__.'/src')
|
||||
->in(__DIR__)
|
||||
->exclude('vendor')
|
||||
->exclude('tests/tmp')
|
||||
->exclude('fixtures')
|
||||
// the PHP template files are a bit special
|
||||
->notName('*.tpl.php')
|
||||
;
|
||||
|
||||
@@ -35,7 +35,7 @@ class EventRegistryTest extends TestCase
|
||||
|
||||
// less than PHP 7.2, unset object type-hint example
|
||||
// otherwise, it looks like a class in this namespace
|
||||
if (PHP_VERSION_ID < 70200) {
|
||||
if (\PHP_VERSION_ID < 70200) {
|
||||
unset($listenersMap[3]);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,11 +19,6 @@ class GeneratorTwigHelperTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider getEntityFieldPrintCodeTests
|
||||
*
|
||||
* @param string $entity
|
||||
* @param string $fieldName
|
||||
* @param string $fieldType
|
||||
* @param string $expect
|
||||
*/
|
||||
public function testGetEntityFieldPrintCode(string $entity, string $fieldName, string $fieldType, string $expect)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ class FunctionalTest extends TestCase
|
||||
continue;
|
||||
}
|
||||
|
||||
/** Skip make forgotten password as it is temp. disabled (tkt#537) */
|
||||
/* Skip make forgotten password as it is temp. disabled (tkt#537) */
|
||||
if (MakeForgottenPassword::class === $class) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeAuthenticator;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeCommand;
|
||||
@@ -29,4 +38,4 @@ class MakeCommandTest extends MakerTestCase
|
||||
->changeRootNamespace('Custom'),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeController;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeCrud;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeEntity;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeFixtures;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeForgottenPassword;
|
||||
@@ -10,6 +19,7 @@ class MakeForgottenPasswordTest extends MakerTestCase
|
||||
{
|
||||
/**
|
||||
* Test skipped until make forgotten password is enabled again.
|
||||
*
|
||||
* @see https://github.com/symfony/maker-bundle/issues/537
|
||||
*/
|
||||
public function getTestDetails()
|
||||
@@ -27,7 +37,7 @@ class MakeForgottenPasswordTest extends MakerTestCase
|
||||
->setFixtureFilesPath(__DIR__.'/../fixtures/MakeForgottenPassword')
|
||||
->configureDatabase()
|
||||
->updateSchemaAfterCommand()
|
||||
->addExtraDependencies('symfony/swiftmailer-bundle')
|
||||
->addExtraDependencies('symfony/swiftmailer-bundle'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeForm;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeFunctionalTest;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeMigration;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeRegistrationForm;
|
||||
@@ -28,7 +37,7 @@ class MakeRegistrationFormTest extends MakerTestCase
|
||||
// test run, the UniqueEntity would not be seen, because
|
||||
// the the validation cache was out of date. The cause
|
||||
// is currently unknown, so this workaround was added
|
||||
->addPostMakeCommand('php bin/console cache:clear --env=test')
|
||||
->addPostMakeCommand('php bin/console cache:clear --env=test'),
|
||||
];
|
||||
|
||||
// sanity check on all the interactive questions
|
||||
@@ -59,7 +68,7 @@ class MakeRegistrationFormTest extends MakerTestCase
|
||||
->updateSchemaAfterCommand()
|
||||
// workaround for strange failure - see test case
|
||||
// registration_form_entity_guard_authenticate for details
|
||||
->addPostMakeCommand('php bin/console cache:clear --env=test')
|
||||
->addPostMakeCommand('php bin/console cache:clear --env=test'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeSerializerEncoder;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeSubscriber;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeTwigExtension;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeUnitTest;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeUser;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeValidator;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Tests\Maker;
|
||||
|
||||
use Symfony\Bundle\MakerBundle\Maker\MakeVoter;
|
||||
|
||||
@@ -249,7 +249,7 @@ class InteractiveSecurityHelperTest extends TestCase
|
||||
yield 'guess_fixture_class' => [
|
||||
'expectedEmailField' => 'email',
|
||||
true,
|
||||
FixtureClass::class
|
||||
FixtureClass::class,
|
||||
];
|
||||
|
||||
yield 'guess_fixture_class_2' => [
|
||||
@@ -284,7 +284,7 @@ class InteractiveSecurityHelperTest extends TestCase
|
||||
yield 'guess_fixture_class' => [
|
||||
'expectedPasswordSetter' => 'setPassword',
|
||||
true,
|
||||
FixtureClass5::class
|
||||
FixtureClass5::class,
|
||||
];
|
||||
|
||||
yield 'guess_fixture_class_2' => [
|
||||
@@ -319,7 +319,7 @@ class InteractiveSecurityHelperTest extends TestCase
|
||||
yield 'guess_fixture_class' => [
|
||||
'expectedPasswordSetter' => 'getEmail',
|
||||
true,
|
||||
FixtureClass7::class
|
||||
FixtureClass7::class,
|
||||
];
|
||||
|
||||
yield 'guess_fixture_class_2' => [
|
||||
@@ -354,20 +354,28 @@ class FixtureClass4
|
||||
|
||||
class FixtureClass5
|
||||
{
|
||||
public function setPassword() {}
|
||||
public function setPassword()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class FixtureClass6
|
||||
{
|
||||
public function setEncodedPassword() {}
|
||||
public function setEncodedPassword()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class FixtureClass7
|
||||
{
|
||||
public function getEmail() {}
|
||||
public function getEmail()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class FixtureClass8
|
||||
{
|
||||
public function getMyEmail() {}
|
||||
public function getMyEmail()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user