/**
  * @test
  *
  * @covers ::setUp
  */
 public function storeSomethingInSession()
 {
     $trait = $this->getTraitMock();
     $trait->startApplication();
     $data = [$this->faker->unique()->word => $this->faker->address, $this->faker->unique()->word => $this->faker->address, $this->faker->unique()->word => $this->faker->address];
     $trait->session($data);
     $trait->assertSessionHasAll($data);
     $trait->flushSession();
     $trait->stopApplication();
 }
 private function distributeRubrics()
 {
     print_r("Distribute rubrics for company...");
     $companies = Company::find()->all();
     $rubrics = Rubric::findRecursive(array(), 'down', true);
     $rubrics_ids = ArrayHelper::getColumn($rubrics, 'id');
     $rubrics_ids_count = count($rubrics_ids);
     foreach ($companies as $company) {
         $this->faker->unique(true);
         $rubric_for_company_count = $this->faker->numberBetween(self::MIN_RUBRIC_FOR_COMPANY, self::MAX_RUBRIC_FOR_COMPANY);
         for ($i = 1; $i <= $rubric_for_company_count; $i++) {
             $company_rubric = new CompanyRubric();
             $company_rubric->company_id = $company->id;
             $company_rubric->rubric_id = $rubrics_ids[$this->faker->unique()->numberBetween(0, $rubrics_ids_count - 1)];
             $company_rubric->save();
         }
     }
     print_r("DONE" . PHP_EOL);
 }
 public function getDummyData(Generator $faker, array $customValues = [])
 {
     return ['reference' => $faker->unique()->bothify('????###'), 'central' => $faker->randomNumber(4), 'cc_cd' => $faker->numerify('CC-###'), 'capacity_asap' => $faker->randomNumber(6), 'capacity_adp' => $faker->randomNumber(6)];
 }
 public function getDummyData(Generator $faker, array $customValues = [])
 {
     $firs_name = $faker->firstName;
     $last_name = $faker->lastName;
     return ['identification' => $faker->unique()->numberBetween(5000000, 39999999), 'first_name' => $firs_name, 'last_name' => $last_name, 'full_name' => $firs_name . ' ' . $last_name, 'avatar' => 'vendor/AdminTheme/images/avatar/default.png', 'type' => $faker->randomElement(['moderator', 'user']), 'email' => $faker->unique()->email, 'password' => '123456'];
 }
 public function getDummyData(Generator $faker, array $valoresPersonalizados = array())
 {
     return ['nombre' => $faker->firstName, 'apellido' => $faker->lastName, 'email' => $faker->unique()->email, 'telefono' => '5' . $faker->randomNumber($nbDigits = 6), 'celular' => '9' . $faker->randomNumber($nbDigits = 8), 'activo' => 1];
 }
Beispiel #6
0
 public function getDummyData(Generator $faker, array $customValues = array())
 {
     return ['name' => $faker->name, 'email' => $faker->unique()->email, 'password' => bcrypt('secret')];
 }
 public function getDummyData(Generator $faker, array $customValues = [])
 {
     $firs_name = $faker->firstName;
     $last_name = $faker->lastName;
     return ['first_name' => $firs_name, 'last_name' => $last_name, 'full_name' => $firs_name . ' ' . $last_name, 'type' => 'user', 'email' => $faker->unique()->email, 'password' => \Hash::make('123456')];
 }
 /**
  * @test
  */
 public function canTestAllOfTraitsMethods()
 {
     $this->assertGetterSetterTraitMethods(DummyTrait::class, $this->faker->unique()->name, $this->faker->unique()->name);
 }
 public function getDummyData(Generator $faker, array $custom = [])
 {
     return ['biography' => $faker->paragraph(4), 'twitter' => '@' . $faker->userName, 'path_avatar' => $faker->imageUrl(250, 300, 'people'), 'web' => $faker->domainName, 'user_id' => $faker->unique()->numberBetween(1, 300)];
 }
 public function getDummyData(Generator $faker, array $valoresPersonalizados = array())
 {
     return ['email' => $faker->unique()->email, 'password' => bcrypt('secret'), 'dni' => $faker->unique()->randomNumber($nbDigits = 8), 'rol_id' => 2];
 }
 public function getDummyData(Generator $faker, array $customValue = array())
 {
     return ['name' => $faker->name, 'email' => $faker->unique()->email, 'password' => bcrypt('123123'), 'type' => 'User'];
 }
 public function getDummyData(Generator $faker, array $customValues = [])
 {
     return ['reference' => $faker->unique()->bothify('????###'), 'description' => $faker->paragraph(1), 'strip_type_id' => rand(1, 5)];
 }
 public function getDummyData(Generator $faker, array $customValues = [])
 {
     return ['reference' => $faker->unique()->bothify('????###'), 'description' => $faker->paragraph(1), 'street' => $faker->streetName, 'croos' => $faker->streetName, 'latitude' => $faker->latitude(), 'longitude' => $faker->longitude(), 'capacity' => rand(1, 600)];
 }