ProviderAwareTraitTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 9
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testProviderClass() 0 7 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\ProviderAwareTrait;
15
16
/**
17
 * @author Yaroslav Honcharuk <[email protected]>
18
 */
19
class ProviderAwareTraitTest extends TestCase
20
{
21
    public function testProviderClass()
22
    {
23
        $providerAware = $this->getMockForTrait(ProviderAwareTrait::class);
24
25
        $providerAware->setProviderClass('foo');
0 ignored issues
show
Bug introduced by
The method setProviderClass() 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
        $providerAware->/** @scrutinizer ignore-call */ 
26
                        setProviderClass('foo');

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
        $this->assertSame('foo', $providerAware->getProviderClass());
0 ignored issues
show
Bug introduced by
The method getProviderClass() 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

27
        $this->assertSame('foo', $providerAware->/** @scrutinizer ignore-call */ getProviderClass());

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...
28
    }
29
}
30