Skip to content

Commit 28c26b5

Browse files
committed
extending php-cs to the tests/ directory
1 parent 4c44601 commit 28c26b5

23 files changed

+188
-19
lines changed

.php_cs.dist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ if (!file_exists(__DIR__.'/src')) {
55
}
66

77
$finder = PhpCsFixer\Finder::create()
8-
->in(__DIR__.'/src')
8+
->in(__DIR__)
9+
->exclude('vendor')
10+
->exclude('tests/tmp')
11+
->exclude('fixtures')
912
// the PHP template files are a bit special
1013
->notName('*.tpl.php')
1114
;

tests/EventRegistryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testGetEventClassNameReturnsType()
3535

3636
// less than PHP 7.2, unset object type-hint example
3737
// otherwise, it looks like a class in this namespace
38-
if (PHP_VERSION_ID < 70200) {
38+
if (\PHP_VERSION_ID < 70200) {
3939
unset($listenersMap[3]);
4040
}
4141

tests/GeneratorTwigHelperTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ class GeneratorTwigHelperTest extends TestCase
1919
{
2020
/**
2121
* @dataProvider getEntityFieldPrintCodeTests
22-
*
23-
* @param string $entity
24-
* @param string $fieldName
25-
* @param string $fieldType
26-
* @param string $expect
2722
*/
2823
public function testGetEntityFieldPrintCode(string $entity, string $fieldName, string $fieldType, string $expect)
2924
{

tests/Maker/FunctionalTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testWiring()
4040
continue;
4141
}
4242

43-
/** Skip make forgotten password as it is temp. disabled (tkt#537) */
43+
/* Skip make forgotten password as it is temp. disabled (tkt#537) */
4444
if (MakeForgottenPassword::class === $class) {
4545
continue;
4646
}

tests/Maker/MakeAuthenticatorTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeAuthenticator;

tests/Maker/MakeCommandTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeCommand;
@@ -29,4 +38,4 @@ public function getTestDetails()
2938
->changeRootNamespace('Custom'),
3039
];
3140
}
32-
}
41+
}

tests/Maker/MakeControllerTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeController;

tests/Maker/MakeCrudTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeCrud;

tests/Maker/MakeEntityTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeEntity;

tests/Maker/MakeFixturesTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeFixtures;

tests/Maker/MakeForgottenPasswordTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeForgottenPassword;
@@ -10,6 +19,7 @@ class MakeForgottenPasswordTest extends MakerTestCase
1019
{
1120
/**
1221
* Test skipped until make forgotten password is enabled again.
22+
*
1323
* @see https://github.com/symfony/maker-bundle/issues/537
1424
*/
1525
public function getTestDetails()
@@ -27,7 +37,7 @@ public function getTestDetails()
2737
->setFixtureFilesPath(__DIR__.'/../fixtures/MakeForgottenPassword')
2838
->configureDatabase()
2939
->updateSchemaAfterCommand()
30-
->addExtraDependencies('symfony/swiftmailer-bundle')
40+
->addExtraDependencies('symfony/swiftmailer-bundle'),
3141
];
3242
}
3343
}

tests/Maker/MakeFormTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeForm;

tests/Maker/MakeFunctionalTestTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeFunctionalTest;

tests/Maker/MakeMigrationTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeMigration;

tests/Maker/MakeRegistrationFormTest.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeRegistrationForm;
@@ -28,7 +37,7 @@ public function getTestDetails()
2837
// test run, the UniqueEntity would not be seen, because
2938
// the the validation cache was out of date. The cause
3039
// is currently unknown, so this workaround was added
31-
->addPostMakeCommand('php bin/console cache:clear --env=test')
40+
->addPostMakeCommand('php bin/console cache:clear --env=test'),
3241
];
3342

3443
// sanity check on all the interactive questions
@@ -59,7 +68,7 @@ public function getTestDetails()
5968
->updateSchemaAfterCommand()
6069
// workaround for strange failure - see test case
6170
// registration_form_entity_guard_authenticate for details
62-
->addPostMakeCommand('php bin/console cache:clear --env=test')
71+
->addPostMakeCommand('php bin/console cache:clear --env=test'),
6372
];
6473
}
6574
}

tests/Maker/MakeSerializerEncoderTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeSerializerEncoder;

tests/Maker/MakeSubscriberTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeSubscriber;

tests/Maker/MakeTwigExtensionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeTwigExtension;

tests/Maker/MakeUnitTestTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeUnitTest;

tests/Maker/MakeUserTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeUser;

tests/Maker/MakeValidatorTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeValidator;

tests/Maker/MakeVoterTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
413

514
use Symfony\Bundle\MakerBundle\Maker\MakeVoter;

0 commit comments

Comments
 (0)