mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-01 04:49:36 +00:00
regression test: check for LCSC SPN in comment
This commit is contained in:
parent
0847acd3f5
commit
1255534a94
1 changed files with 13 additions and 0 deletions
|
|
@ -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 = <<<CSV
|
||||
"Reference","Value","Footprint","Quantity","MPN","Manufacturer","LCSC SPN","Mouser SPN"
|
||||
"R1,R2","10k","R_0805_2012Metric",2,"CRCW080510K0FKEA","Vishay","C123456","123-M10K"
|
||||
|
|
@ -386,10 +393,16 @@ class BOMImporterTest extends WebTestCase
|
|||
$this->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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue