AbstractSymfonySecurityTestTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 14
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testAttributes() 0 5 1
A testSubject() 0 5 1
1
<?php
2
3
/*
4
 *
5
 * (c) Yaroslav Honcharuk <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Yarhon\RouteGuardBundle\Tests\Security\Test;
12
13
use PHPUnit\Framework\TestCase;
14
use Yarhon\RouteGuardBundle\Security\Test\AbstractSymfonySecurityTest;
15
16
/**
17
 * @author Yaroslav Honcharuk <[email protected]>
18
 */
19
class AbstractSymfonySecurityTestTest extends TestCase
20
{
21
    public function testAttributes()
22
    {
23
        $test = $this->getMockForAbstractClass(AbstractSymfonySecurityTest::class, [['foo', 'bar']]);
24
25
        $this->assertSame(['foo', 'bar'], $test->getAttributes());
0 ignored issues
show
Bug introduced by
The method getAttributes() does not exist on PHPUnit\Framework\MockObject\MockObject. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

25
        $this->assertSame(['foo', 'bar'], $test->/** @scrutinizer ignore-call */ getAttributes());

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
26
    }
27
28
    public function testSubject()
29
    {
30
        $test = $this->getMockForAbstractClass(AbstractSymfonySecurityTest::class, [[], 'foo']);
31
32
        $this->assertSame('foo', $test->getSubject());
0 ignored issues
show
Bug introduced by
The method getSubject() does not exist on PHPUnit\Framework\MockObject\MockObject. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

32
        $this->assertSame('foo', $test->/** @scrutinizer ignore-call */ getSubject());

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
33
    }
34
}
35