Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Add some tests.
James Cole37c63bc6b506
diff --git a/app/controllers/ProfileController.php b/app/controllers/ProfileController.phpindex 2d1f1e5f64..cd4e638f1f 100644--- a/app/controllers/ProfileController.php+++ b/app/controllers/ProfileController.php@@ -57,8 +57,8 @@ class ProfileController extends BaseController}// update the user with the new password.- /** @var \FireflyIII\Database\User $repository */- $repository = \App::make('FireflyIII\Database\User');+ /** @var \FireflyIII\Database\User\User $repository */+ $repository = \App::make('FireflyIII\Database\User\User');$repository->updatePassword(Auth::user(), Input::get('new1'));Session::flash('success', 'Password changed!');diff --git a/app/controllers/UserController.php b/app/controllers/UserController.phpindex 5d101c850f..4cf00ce1a1 100644--- a/app/controllers/UserController.php+++ b/app/controllers/UserController.php@@ -71,8 +71,8 @@ class UserController extends BaseControllerreturn View::make('error')->with('message', 'Not possible');}- /** @var \FireflyIII\Database\User $repository */- $repository = App::make('FireflyIII\Database\User');+ /** @var \FireflyIII\Database\User\User $repository */+ $repository = App::make('FireflyIII\Database\User\User');/** @var \FireflyIII\Shared\Mail\RegistrationInterface $email */$email = App::make('FireflyIII\Shared\Mail\RegistrationInterface');@@ -105,8 +105,8 @@ class UserController extends BaseControllerpublic function postRemindme(){- /** @var \FireflyIII\Database\User $repository */- $repository = App::make('FireflyIII\Database\User');+ /** @var \FireflyIII\Database\User\User $repository */+ $repository = App::make('FireflyIII\Database\User\User');/** @var \FireflyIII\Shared\Mail\RegistrationInterface $email */$email = App::make('FireflyIII\Shared\Mail\RegistrationInterface');@@ -163,8 +163,8 @@ class UserController extends BaseControllerpublic function reset($reset){- /** @var \FireflyIII\Database\User $repository */- $repository = App::make('FireflyIII\Database\User');+ /** @var \FireflyIII\Database\User\User $repository */+ $repository = App::make('FireflyIII\Database\User\User');/** @var \FireflyIII\Shared\Mail\RegistrationInterface $email */$email = App::make('FireflyIII\Shared\Mail\RegistrationInterface');diff --git a/app/database/migrations/2014_12_13_190730_changes_for_v321.php b/app/database/migrations/2014_12_13_190730_changes_for_v321.phpindex f2349ca743..820439adbe 100644--- a/app/database/migrations/2014_12_13_190730_changes_for_v321.php+++ b/app/database/migrations/2014_12_13_190730_changes_for_v321.php@@ -31,10 +31,11 @@ class ChangesForV321 extends Migration// create column in "transactions"// create foreign key in "transactions"+ // TODO skipped because not supported in SQLiteSchema::table('transactions', function (Blueprint $table) {- $table->integer('piggybank_id')->nullable()->unsigned();- $table->foreign('piggybank_id')->references('id')->on('piggybanks')->onDelete('set null');+ #$table->integer('piggybank_id')->nullable()->unsigned();+ #$table->foreign('piggybank_id')->references('id')->on('piggybanks')->onDelete('set null');});}@@ -59,11 +60,12 @@ class ChangesForV321 extends Migration// drop foreign key in "transactions"// drop column in "transactions"+ // TODO skipped because not supported in SQLiteSchema::table('transactions', function (Blueprint $table) {- $table->dropForeign('transactions_piggybank_id_foreign');- $table->dropIndex('transactions_piggybank_id_foreign');- $table->dropColumn('piggybank_id');+ #$table->dropForeign('transactions_piggybank_id_foreign');+ #$table->dropIndex('transactions_piggybank_id_foreign');+ #$table->dropColumn('piggybank_id');});diff --git a/tests/functional/AccountControllerCest.php b/tests/functional/AccountControllerCest.phpindex 5cdd1111ae..1a3cc4f215 100644--- a/tests/functional/AccountControllerCest.php+++ b/tests/functional/AccountControllerCest.php@@ -1,5 +1,4 @@<?php-use Carbon\Carbon;/*** @SuppressWarnings("CamelCase")@@ -52,6 +51,12 @@ class AccountControllerCestpublic function destroy(FunctionalTester $I){$I->wantTo('destroy an asset account');+ $I->amOnPage('/accounts/delete/3');+ $I->see('Delete account "Delete me"');+ $I->submitForm('#destroy', []);+ // TODO I dont believe this actually works.+ $I->dontSeeRecord('accounts', ['id' => 3, 'deleted_at' => null]);+ resetToClean::clean();}/**