public function testRuleSet() { $configuration = new Configuration('path/to/rule_set', 'path/to/container.xml', true, 'path/to/cache/dir/', '', true, true, 'html.log'); $this->assertEquals('path/to/rule_set', $configuration->ruleSet()); $this->assertEquals('path/to/container.xml', $configuration->containerPath()); $this->assertTrue($configuration->useCachedRuleSet()); $this->assertEquals('path/to/cache/dir/', $configuration->ruleSetCacheDir()); $this->assertEquals('', $configuration->filteredMethodCalls()); $this->assertTrue($configuration->failOnDeprecation()); $this->assertTrue($configuration->isVerbose()); $this->assertEquals('html.log', $configuration->logHtml()); }
/** * @param Configuration $configuration * * @return ComposedResolver */ private function getSymbolTableVariableResolver(Configuration $configuration) { $composedResolver = new ComposedResolver(); $composedResolver->addResolver(new ArgumentResolver($this->symbolTable)); $composedResolver->addResolver(new ReattachStateToVariable($this->symbolTable)); $composedResolver->addResolver(new ReattachStateToProperty($this->symbolTable)); $composedResolver->addResolver(new VariableAssignResolver($this->symbolTable)); $composedResolver->addResolver(new PropertyAssignResolver($this->symbolTable)); /* @TODO: only load the container if the project is a symfony project */ $containerReader = new ContainerReader(); $containerReader->loadContainer($configuration->containerPath()); $composedResolver->addResolver(new SymfonyResolver($this->symbolTable, $containerReader)); return $composedResolver; }