SensioLabs\Deptrac\Tests\Collector\InheritanceLevelCollectorTest::testSatisfy PHP Method

testSatisfy() public method

public testSatisfy ( $pathLevel, $levelConfig, $expected )
$pathLevel
$levelConfig
$expected
    public function testSatisfy($pathLevel, $levelConfig, $expected)
    {
        $classInherit = $this->prophesize(AstMap\AstInheritInterface::class);
        $classInherit->getPath()->willReturn(array_fill(0, $pathLevel, 1));
        $astMap = $this->prophesize(AstMap::class);
        $astMap->getClassInherits(Argument::any())->willReturn([$classInherit->reveal()]);
        $stat = (new InheritanceLevelCollector())->satisfy(['level' => $levelConfig], $this->prophesize(AstClassReferenceInterface::class)->reveal(), $astMap->reveal(), $this->prophesize(CollectorFactory::class)->reveal(), $this->prophesize(AstParserInterface::class)->reveal());
        $this->assertEquals($expected, $stat);
    }
InheritanceLevelCollectorTest