mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
More test data tweaks.
This commit is contained in:
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Attachment;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\Role;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Support\Migration\TestData;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
* Class OldTestDataSeeder
|
||||
*/
|
||||
class OldTestDataSeeder extends Seeder
|
||||
{
|
||||
/** @var Carbon */
|
||||
public $start;
|
||||
|
||||
/**
|
||||
* TestDataSeeder constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->start = Carbon::create()->subYear()->startOfYear();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// create budget limits for these budgets
|
||||
// TestData::createBudgetLimit($user, new Carbon, 'Groceries', 400);
|
||||
// TestData::createBudgetLimit($user, new Carbon, 'Bills', 1000);
|
||||
// TestData::createBudgetLimit($user, new Carbon, 'Car', 100);
|
||||
|
||||
// create some categories for user #1
|
||||
$this->createCategories($user);
|
||||
|
||||
// create some piggy banks for user #1
|
||||
TestData::createPiggybanks($user);
|
||||
|
||||
// create some expense accounts for user #1
|
||||
$this->createExpenseAccounts($user);
|
||||
|
||||
// create some revenue accounts for user #1
|
||||
$this->createRevenueAccounts($user);
|
||||
|
||||
// create journal + attachment:
|
||||
TestData::createAttachments($user, $this->start);
|
||||
|
||||
// create opening balance for savings account:
|
||||
$this->openingBalanceSavings($user);
|
||||
|
||||
// need at least one rule group and one rule:
|
||||
TestData::createRules($user);
|
||||
|
||||
// create a tag:
|
||||
TestData::createTags($user);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -64,25 +64,24 @@ class TestDataSeeder extends Seeder
|
||||
|
||||
// pay bills:
|
||||
TestData::createRent($user, 'Rent for ' . $month, $current, '800');
|
||||
// $this->createWater('Water bill for ' . $month, $current, 15);
|
||||
// $this->createTV('TV bill for ' . $month, $current, 60);
|
||||
// $this->createPower('Power bill for ' . $month, $current, 120);
|
||||
|
||||
TestData::createWater($user, 'Water bill for ' . $month, $current, '15');
|
||||
TestData::createTV($user, 'TV bill for ' . $month, $current, '60');
|
||||
TestData::createPower($user, 'Power bill for ' . $month, $current, '120');
|
||||
|
||||
// pay daily groceries:
|
||||
// $this->createGroceries($current);
|
||||
TestData::createGroceries($user, $current);
|
||||
|
||||
// create tag (each type of tag, for date):
|
||||
// TestData::createTags($this->user, $current);
|
||||
TestData::createTags($user, $current);
|
||||
|
||||
// go out for drinks:
|
||||
// $this->createDrinksAndOthers($current);
|
||||
TestData::createDrinksAndOthers($user, $current);
|
||||
|
||||
// save money every month:
|
||||
// $this->createSavings($current);
|
||||
TestData::createSavings($user, $current);
|
||||
|
||||
// buy gas for the car every month:
|
||||
// $this->createCar($current);
|
||||
TestData::createCar($user, $current);
|
||||
|
||||
// create budget limits.
|
||||
TestData::createBudgetLimit($user, $current, 'Groceries', '400');
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user