assertInstanceOf(ImportAbcFile::class, $importer); } public function testCreateInjectingBuilder() { $builder = new Builder(); $importer = ImportAbcFile::create($builder); $this->assertInstanceOf(ImportAbcFile::class, $importer); } public function testImport() { $abc = $this->getAbc('/abc/jigs.abc'); $importer = ImportAbcFile::create(); $result = $importer->import($abc); $this->assertInstanceOf(TuneCollection::class, $result); $this->assertGreaterThan(1, $result->count()); } public function testImport2FilesConsecutively() { $abc2 = $this->getAbc('/abc/valid_abc_2.abc'); $abc3 = $this->getAbc('/abc/valid_abc_3.abc'); $importer = ImportAbcFile::create(); $result1 = $importer->import($abc2); $result2 = $importer->import($abc3); $this->assertNotEquals($result1, $result2); } public function testImportMultiple() { $abc1 = $this->getAbc('/abc/valid_abc_1.abc'); $abc2 = $this->getAbc('/abc/valid_abc_2.abc'); $abc3 = $this->getAbc('/abc/valid_abc_3.abc'); $importer = ImportAbcFile::create(); $result = $importer->importMultiple([$abc1, $abc2, $abc3]); $this->assertInstanceOf(TuneCollection::class, $result); $this->assertGreaterThan(1, $result->count()); } }