Removed Firefly’s ability to generate test data.

This commit is contained in:
James Cole
2016-12-24 14:48:14 +01:00
parent afe98cda9f
commit 9f2729d0ff
8 changed files with 0 additions and 3893 deletions

View File

@@ -28,7 +28,6 @@ class DatabaseSeeder extends Seeder
$this->call(TransactionCurrencySeeder::class);
$this->call(TransactionTypeSeeder::class);
$this->call(PermissionSeeder::class);
$this->call(TestDataSeeder::class);
}
}

View File

@@ -1,57 +0,0 @@
<?php
/**
* TestDataSeeder.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
use FireflyIII\Support\Migration\TestData;
use Illuminate\Database\Seeder;
/**
* Class TestDataSeeder
*/
class TestDataSeeder extends Seeder
{
/**
* TestDataSeeder constructor.
*/
public function __construct()
{
}
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$disk = Storage::disk('seeds');
$env = App::environment();
Log::debug('Environment is ' . $env);
$fileName = 'seed.' . $env . '.json';
if ($disk->exists($fileName)) {
Log::debug('Now seeding ' . $fileName);
$file = json_decode($disk->get($fileName), true);
if (is_array($file)) {
// run the file:
TestData::run($file);
return;
}
Log::error(sprintf('No valid data found (%s) for environment %s', $fileName, $env));
return;
}
Log::error(sprintf('No seed file (%s) for environment %s', $fileName, $env));
}
}