2016-12-29 18:35:34 +03:00
|
|
|
<?php
|
2016-02-22 02:38:41 +03:00
|
|
|
$I = new AcceptanceTester($scenario);
|
|
|
|
|
2017-01-12 12:31:31 +03:00
|
|
|
// $I->wantTo('generate a pivot table seeder');
|
|
|
|
// $I->runShellCommand('php artisan wn:pivot-seeder tasks ShortTag');
|
|
|
|
// $I->seeInShellOutput('ShortTagTaskTableSeeder generated');
|
|
|
|
// $I->openFile('./database/seeds/ShortTagTaskTableSeeder.php');
|
|
|
|
// $I->seeInThisFile("
|
|
|
|
// use Illuminate\Database\Seeder;
|
|
|
|
// use Faker\Factory as Faker;
|
2016-02-22 02:38:41 +03:00
|
|
|
|
2017-01-12 12:31:31 +03:00
|
|
|
// class ShortTagTaskTableSeeder extends Seeder
|
|
|
|
// {
|
|
|
|
// public function run()
|
|
|
|
// {
|
|
|
|
// \$faker = Faker::create();
|
2016-02-22 02:38:41 +03:00
|
|
|
|
2017-01-12 12:31:31 +03:00
|
|
|
// \$firstIds = DB::table('short_tags')->lists('id');
|
|
|
|
// \$secondIds = DB::table('tasks')->lists('id');
|
2016-02-22 02:38:41 +03:00
|
|
|
|
2017-01-12 12:31:31 +03:00
|
|
|
// for(\$i = 0; \$i < 10; \$i++) {
|
|
|
|
// DB::table('short_tag_task')->insert([
|
|
|
|
// 'short_tag_id' => \$faker->randomElement(\$firstIds),
|
|
|
|
// 'task_id' => \$faker->randomElement(\$secondIds)
|
|
|
|
// ]);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }");
|
|
|
|
// $I->deleteFile('./database/seeds/ShortTagTaskTableSeeder.php');
|