/** * Tests that the parser handles an interface within an instanceof operator * correct. * * @return void */ public function testAnalyzerReturnsExpectedNPathValue() { $namespaces = self::parseCodeResourceForTest(); $function = $namespaces->current()->getFunctions()->current(); $analyzer = new NPathComplexityAnalyzer(); $analyzer->setCache(new MemoryCacheDriver()); $analyzer->analyze($namespaces); $this->assertEquals(array('npath' => '6'), $analyzer->getNodeMetrics($function)); }