use of com.synopsys.integration.detectable.detectables.packagist.ComposerLockExtractor in project synopsys-detect by blackducksoftware.
the class DetectableFactory method createComposerDetectable.
public ComposerLockDetectable createComposerDetectable(DetectableEnvironment environment, ComposerLockDetectableOptions composerLockDetectableOptions) {
PackagistParser packagistParser = new PackagistParser(externalIdFactory, composerLockDetectableOptions.getDependencyTypeFilter());
ComposerLockExtractor composerLockExtractor = new ComposerLockExtractor(packagistParser);
return new ComposerLockDetectable(environment, fileFinder, composerLockExtractor);
}
use of com.synopsys.integration.detectable.detectables.packagist.ComposerLockExtractor in project synopsys-detect by blackducksoftware.
the class ComposerLockDetectableTest method testApplicable.
@Test
public void testApplicable() {
ComposerLockExtractor composerLockExtractor = null;
DetectableEnvironment environment = MockDetectableEnvironment.empty();
FileFinder fileFinder = MockFileFinder.withFilesNamed("composer.lock", "composer.json");
ComposerLockDetectable detectable = new ComposerLockDetectable(environment, fileFinder, composerLockExtractor);
assertTrue(detectable.applicable().getPassed());
}
Aggregations