Expanded test coverage.

This commit is contained in:
James Cole
2017-03-25 13:41:17 +01:00
parent 1fb0a64f31
commit 5770edcde2
26 changed files with 520 additions and 109 deletions

View File

@@ -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,

View File

@@ -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']);
}
);
}
}
/**
*
*/

View File

@@ -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');
}
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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');
// }
// );
}

View File

@@ -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;

View File

@@ -8,7 +8,7 @@
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
declare(strict_types=1);
use Illuminate\Database\Seeder;

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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;