A free open source IT asset/license management system
Added manufacturer factory
snipe8ddbb4e64f82
diff --git a/database/factories/ImportFactory.php b/database/factories/ImportFactory.phpindex f0b0bc0da4..95c9645524 100644--- a/database/factories/ImportFactory.php+++ b/database/factories/ImportFactory.php@@ -201,4 +201,22 @@ class ImportFactory extends Factory});}+ /**+ * Create a supplier import type.+ *+ * @return static+ */+ public function manufacturers()+ {+ return $this->state(function (array $attributes) {+ $fileBuilder = Importing\ManufacturersImportFileBuilder::new();+ $attributes['name'] = "Manufacturer {$attributes['name']}";+ $attributes['import_type'] = 'manufacturer';+ $attributes['header_row'] = $fileBuilder->toCsv()[0];+ $attributes['first_row'] = $fileBuilder->firstRow();++ return $attributes;+ });+ }+}