/** * Setup initial data for use in tests */ public function setup() { parent::setup(); $this->seed('RedminSeeder'); // Add product $product = new Product(); $product->name = 'This is title'; $product->sku = 'UNIQUESKU001'; $product->short_description = 'This is body'; $product->active = true; $product->category_id = 1; $product->save(); }
/** * Setup initial data for use in tests */ public function setup() { parent::setup(); // Add membership $membership = new Membership(); $membership->name = "Gold"; $membership->rank = 5; $membership->save(); // Add module $module = new Module(); $module->name = 'This is title'; $module->sku = 'UNIQUESKU001'; $module->short_description = 'This is body'; $module->long_description = 'This is long body'; $module->featured = true; $module->active = true; $module->category_id = 1; $module->save(); // Create a new Pricelist for use later $pricelist = new Pricelist(); $pricelist->module_id = 1; $pricelist->membership_id = 1; $pricelist->price = 1; $pricelist->save(); // Create a new Product for use later $product = new Product(); $product->name = 'This is the title'; $product->sku = 'UNIQUESKU001'; $product->short_description = 'This is the body'; $product->category_id = 1; $product->active = true; $product->save(); // Create a new Category for use later $category = new Category(); $category->name = 'This is a name'; $category->short_description = 'This is short description'; $category->long_description = 'This is long description'; $category->active = true; $category->order = 1; $category->save(); }