/** * Setup the test environment.10 * * @return array */ public function setup() { parent::setup(); $testModels = array(array('model' => 'FooBar', 'sku' => 10, 'type' => 'small'), array('model' => 'FooBaz', 'sku' => 8, 'type' => 'small'), array('model' => 'BazBar', 'sku' => 9, 'type' => 'med'), array('model' => 'FooBaz', 'sku' => 20, 'type' => 'med'), array('model' => 'BarFoo', 'sku' => 18, 'type' => 'med'), array('model' => 'FooBar', 'sku' => 10, 'type' => 'med'), array('model' => 'FooBaz', 'sku' => 8, 'type' => 'med'), array('model' => 'BazBar', 'sku' => 10, 'type' => 'small'), array('model' => 'FooBaz', 'sku' => null, 'type' => null)); foreach ($testModels as $item) { $widget = new Widget(); $widget->setRawAttributes($item); $widget->save(); } }
/** * Setup the test environment. * * @return array */ public function setup() { parent::setup(); $this->testUser = self::createTestUser(); }