Skip to content

Commit 4d11df6

Browse files
authored
Merge pull request #3 from mobizel/fix/phpunit-standard
Fix PHPUnit standard
2 parents 9e7de4a + 094ec56 commit 4d11df6

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

ecs.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
declare(strict_types=1);
44

5+
use PhpCsFixer\Fixer\Casing\NativeFunctionCasingFixer;
56
use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer;
67
use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer;
78
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
9+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitInternalClassFixer;
10+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitMethodCasingFixer;
11+
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestClassRequiresCoversFixer;
812
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
913
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
1014
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
@@ -18,5 +22,10 @@
1822
$services->set(NoUnusedImportsFixer::class);
1923

2024
$parameters = $containerConfigurator->parameters();
21-
$parameters->set('skip', [VisibilityRequiredFixer::class => ['*Spec.php']]);
25+
$parameters->set('skip', [
26+
VisibilityRequiredFixer::class => ['*Spec.php'],
27+
PhpUnitTestClassRequiresCoversFixer::class => ['*Test.php'],
28+
PhpUnitInternalClassFixer::class => ['*Test.php'],
29+
PhpUnitMethodCasingFixer::class => ['*Test.php'],
30+
]);
2231
};

tests/SampleApiTest.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the coding-standard project.
5+
*
6+
* (c) Mobizel
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
declare(strict_types=1);
13+
14+
namespace Tests\CodingStandard;
15+
16+
final class SampleApiTest
17+
{
18+
/**
19+
* @test
20+
*/
21+
public function it_does_not_allow_to_create_a_new_foo_for_non_authenticated_user(): void
22+
{
23+
}
24+
}

0 commit comments

Comments
 (0)