BaseGeneratorStrategyTest::testGenerate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ProxyManagerTest\GeneratorStrategy;
6
7
use PHPUnit\Framework\TestCase;
8
use ProxyManager\Generator\ClassGenerator;
9
use ProxyManager\Generator\Util\UniqueIdentifierGenerator;
10
use ProxyManager\GeneratorStrategy\BaseGeneratorStrategy;
11
use function strpos;
12
13
/**
14
 * Tests for {@see \ProxyManager\GeneratorStrategy\BaseGeneratorStrategy}
15
 *
16
 * @group Coverage
17
 */
18
final class BaseGeneratorStrategyTest extends TestCase
19
{
20
    /**
21
     * @covers \ProxyManager\GeneratorStrategy\BaseGeneratorStrategy::generate
22
     */
23
    public function testGenerate() : void
24
    {
25
        $strategy       = new BaseGeneratorStrategy();
26
        $className      = UniqueIdentifierGenerator::getIdentifier('Foo');
27
        $classGenerator = new ClassGenerator($className);
28
        $generated      = $strategy->generate($classGenerator);
29
30
        self::assertGreaterThan(0, strpos($generated, $className));
0 ignored issues
show
Bug introduced by
The method assertGreaterThan() does not seem to exist on object<ProxyManagerTest\...eGeneratorStrategyTest>.

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...
31
    }
32
}
33