mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Expanded test coverage.
This commit is contained in:
@@ -8,7 +8,10 @@
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -182,6 +185,7 @@ $factory->define(
|
||||
'description' => $faker->words(3, true),
|
||||
'source_account_name' => $faker->words(3, true),
|
||||
'destination_account_id' => $faker->numberBetween(1, 10),
|
||||
'date' => new Carbon,
|
||||
'destination_account_name' => $faker->words(3, true),
|
||||
'amount' => strval($faker->randomFloat(2, -100, 100)),
|
||||
'budget_id' => 0,
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
@@ -76,6 +76,23 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
private function createConfigurationTable()
|
||||
{
|
||||
if (!Schema::hasTable('configuration')) {
|
||||
Schema::create(
|
||||
'configuration', function (Blueprint $table) {
|
||||
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->string('name', 50);
|
||||
$table->text('data');
|
||||
$table->unique(['name']);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -99,23 +116,6 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
private function createConfigurationTable()
|
||||
{
|
||||
if (!Schema::hasTable('configuration')) {
|
||||
Schema::create(
|
||||
'configuration', function (Blueprint $table) {
|
||||
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->string('name', 50);
|
||||
$table->text('data');
|
||||
$table->unique(['name']);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
@@ -18,6 +18,14 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
*/
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('users');
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
@@ -40,12 +48,4 @@ class CreateUsersTable extends Migration
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('users');
|
||||
}
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
@@ -43,11 +43,11 @@ class ChangesForV431 extends Migration
|
||||
);
|
||||
|
||||
// change field "start_date" to "startdate"
|
||||
// Schema::table(
|
||||
// 'budget_limits', function (Blueprint $table) {
|
||||
// $table->renameColumn('startdate', 'start_date');
|
||||
// }
|
||||
// );
|
||||
// Schema::table(
|
||||
// 'budget_limits', function (Blueprint $table) {
|
||||
// $table->renameColumn('startdate', 'start_date');
|
||||
// }
|
||||
// );
|
||||
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
use FireflyIII\Models\AccountType;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
|
@@ -9,8 +9,7 @@
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
use FireflyIII\Models\Role;
|
||||
@@ -29,10 +28,10 @@ class PermissionSeeder extends Seeder
|
||||
$owner->description = 'User runs this instance of FF3'; // optional
|
||||
$owner->save();
|
||||
|
||||
$demo = new Role;
|
||||
$demo->name ='demo';
|
||||
$demo = new Role;
|
||||
$demo->name = 'demo';
|
||||
$demo->display_name = 'Demo User';
|
||||
$demo->description = 'User is a demo user';
|
||||
$demo->description = 'User is a demo user';
|
||||
$demo->save();
|
||||
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
Reference in New Issue
Block a user