From 1255534a9487ffde66b204f8e07f816e78b0e84d Mon Sep 17 00:00:00 2001 From: MayNiklas Date: Sun, 25 Jan 2026 20:15:15 +0100 Subject: [PATCH] regression test: check for LCSC SPN in comment --- .../Services/ImportExportSystem/BOMImporterTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Services/ImportExportSystem/BOMImporterTest.php b/tests/Services/ImportExportSystem/BOMImporterTest.php index 52c633d0..d486b932 100644 --- a/tests/Services/ImportExportSystem/BOMImporterTest.php +++ b/tests/Services/ImportExportSystem/BOMImporterTest.php @@ -353,6 +353,13 @@ class BOMImporterTest extends WebTestCase public function testStringToBOMEntriesKiCADSchematic(): void { + // Create test suppliers for this test + $lcscSupplier = new Supplier(); + $lcscSupplier->setName('LCSC'); + + $this->entityManager->persist($lcscSupplier); + $this->entityManager->flush(); + $input = <<assertStringContainsString('Value: 10k', $bom_entries[0]->getComment()); $this->assertStringContainsString('MPN: CRCW080510K0FKEA', $bom_entries[0]->getComment()); $this->assertStringContainsString('Manf: Vishay', $bom_entries[0]->getComment()); + $this->assertStringContainsString('LCSC SPN: C123456', $bom_entries[0]->getComment()); // Check second entry $this->assertEquals('C1', $bom_entries[1]->getMountnames()); $this->assertEquals(1.0, $bom_entries[1]->getQuantity()); + $this->assertStringContainsString('LCSC SPN: C789012', $bom_entries[1]->getComment()); + + // Clean up + $this->entityManager->remove($lcscSupplier); + $this->entityManager->flush(); } public function testStringToBOMEntriesKiCADSchematicWithPriority(): void