Completed
Push — master ( 4d96cc...d35fc1 )
by Tomáš
04:03 queued 01:56
created

StandardTest::testRegisteredSniffsFromPsr2()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 5
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Symplify\MultiCodingStandard\Tests\CodeSniffer\CodeSnifferFactory\Standard;
4
5
use PHP_CodeSniffer;
6
use phpunit\framework\TestCase;
7
use PHPUnit_Framework_Assert;
8
use Symplify\MultiCodingStandard\Tests\ContainerFactory;
9
10 View Code Duplication
final class StandardTest extends TestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
11
{
12
    /**
13
     * @var PHP_CodeSniffer
14
     */
15
    private $codeSniffer;
16
17
    protected function setUp()
18
    {
19
        $container = (new ContainerFactory())->createWithConfig(__DIR__ . '/config/config.neon');
20
        $this->codeSniffer = $container->getByType(PHP_CodeSniffer::class);
21
    }
22
23
    public function testRegisteredSniffsFromPsr2()
24
    {
25
        $registeredSniffs = PHPUnit_Framework_Assert::getObjectAttribute($this->codeSniffer, 'sniffs');
26
        $this->assertCount(41, $registeredSniffs);
27
    }
28
}
29