mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-04-30 20:24:32 +02:00
Adding version to the composer.lock displayFileName
Changed output to debug Added basic test for composer parsing, including the new version
This commit is contained in:
@@ -36,6 +36,8 @@ import java.security.NoSuchAlgorithmException;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
|
||||
/**
|
||||
* Unit tests for NodePackageAnalyzer.
|
||||
@@ -99,6 +101,8 @@ public class ComposerLockAnalyzerTest extends BaseDBTestCase {
|
||||
final Dependency result = new Dependency(BaseTest.getResourceAsFile(this,
|
||||
"composer.lock"));
|
||||
analyzer.analyze(result, engine);
|
||||
assertEquals(30,engine.getDependencies().size());
|
||||
assertThat(engine.getDependencies().get(0).getDisplayFileName(),equalTo("composer.lock:classpreloader/classpreloader/2.0.0"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user