More code for split and small bug fix in attachment helper.

This commit is contained in:
James Cole
2016-04-30 09:48:39 +02:00
parent 11ea4b6d47
commit 4ec6bcc8c7
10 changed files with 126 additions and 27 deletions

View File

@@ -26,6 +26,10 @@ class DatabaseSeeder extends Seeder
if (App::environment() == 'testing' || App::environment() == 'local') {
$this->call('TestDataSeeder');
}
// set up basic test data (as little as possible):
if (App::environment() == 'split') {
$this->call('SplitDataSeeder');
}
}
}

View File

@@ -0,0 +1,55 @@
<?php
/**
* SplitDataSeeder.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
/**
* SplitDataSeeder.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
use FireflyIII\Support\Migration\TestData;
use Illuminate\Database\Seeder;
/**
* Class SplitDataSeeder
*/
class SplitDataSeeder extends Seeder
{
/**
* TestDataSeeder constructor.
*/
public function __construct()
{
}
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// start by creating all users:
// method will return the first user.
$user = TestData::createUsers();
// create all kinds of static data:
TestData::createAssetAccounts($user);
TestData::createBudgets($user);
TestData::createCategories($user);
TestData::createExpenseAccounts($user);
TestData::createRevenueAccounts($user);
}
}