Skip to content

Firefly III: a personal finances manager

Mostly cleanup and bug fixes.

James Colef05d626e38b6
diff --git a/app/database/migrations/2014_11_17_194734_event_table_additions_1.php b/app/database/migrations/2014_11_17_194734_event_table_additions_1.php
index e5e419bb7f..6ccfb73235 100644
--- a/app/database/migrations/2014_11_17_194734_event_table_additions_1.php
+++ b/app/database/migrations/2014_11_17_194734_event_table_additions_1.php
@@ -26,7 +26,7 @@ class EventTableAdditions1 extends Migration
// remove some fields:
Schema::table(
'reminders', function (Blueprint $table) {
- $table->boolean('notnow');
+ $table->boolean('notnow')->default(0);
$table->integer('remindersable_id')->unsigned()->nullable();
$table->string('remindersable_type')->nullable();
}
diff --git a/app/lib/FireflyIII/Event/TransactionJournal.php b/app/lib/FireflyIII/Event/TransactionJournal.php
index e966e13ff5..aabc4c0537 100644
--- a/app/lib/FireflyIII/Event/TransactionJournal.php
+++ b/app/lib/FireflyIII/Event/TransactionJournal.php
@@ -1,11 +1,4 @@
<?php
-/**
- * Created by PhpStorm.
- * User: sander
- * Date: 19/11/14
- * Time: 21:11
- */
-
namespace FireflyIII\Event;
diff --git a/app/lib/FireflyIII/Search/Search.php b/app/lib/FireflyIII/Search/Search.php
index e04cef733f..6af5a92c15 100644
--- a/app/lib/FireflyIII/Search/Search.php
+++ b/app/lib/FireflyIII/Search/Search.php
@@ -1,10 +1,4 @@
<?php
-/**
- * Created by PhpStorm.
- * User: sander
- * Date: 13/11/14
- * Time: 21:01
- */
namespace FireflyIII\Search;
diff --git a/app/models/Reminder.php b/app/models/Reminder.php
index 0a28b43165..7a772d1111 100644
--- a/app/models/Reminder.php
+++ b/app/models/Reminder.php
@@ -34,7 +34,7 @@ use LaravelBook\Ardent\Ardent;
* @method static \Illuminate\Database\Query\Builder|\Reminder whereRemindersableId($value)
* @method static \Illuminate\Database\Query\Builder|\Reminder whereRemindersableType($value)
*/
-class Reminder extends Eloquent
+class Reminder extends Ardent
{
protected $table = 'reminders';
diff --git a/app/tests/AccountControllerTest.php b/app/tests/AccountControllerTest.php
deleted file mode 100644
index cb772a8f28..0000000000
--- a/app/tests/AccountControllerTest.php
+++ /dev/null
@@ -1,127 +0,0 @@
-<?php
-
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:03:02.
- */
-class AccountControllerTest extends TestCase
-{
- /**
- * @var AccountController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- parent::setUp();
- }
-
- /**
- * @covers AccountController::create
- * @todo Implement testCreate().
- */
- public function testCreate()
- {
-
-
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers AccountController::delete
- * @todo Implement testDelete().
- */
- public function testDelete()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers AccountController::destroy
- * @todo Implement testDestroy().
- */
- public function testDestroy()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers AccountController::edit
- * @todo Implement testEdit().
- */
- public function testEdit()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers AccountController::index
- * @todo Implement testIndex().
- */
- public function testIndex()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers AccountController::show
- * @todo Implement testShow().
- */
- public function testShow()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers AccountController::store
- * @todo Implement testStore().
- */
- public function testStore()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers AccountController::update
- * @todo Implement testUpdate().
- */
- public function testUpdate()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-}
diff --git a/app/tests/BudgetControllerTest.php b/app/tests/BudgetControllerTest.php
deleted file mode 100644
index c2565580d5..0000000000
--- a/app/tests/BudgetControllerTest.php
+++ /dev/null
@@ -1,159 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:03:30.
- */
-class BudgetControllerTest extends TestCase
-{
- /**
- * @var BudgetController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers BudgetController::amount
- * @todo Implement testAmount().
- */
- public function testAmount()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers BudgetController::create
- * @todo Implement testCreate().
- */
- public function testCreate()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers BudgetController::delete
- * @todo Implement testDelete().
- */
- public function testDelete()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers BudgetController::destroy
- * @todo Implement testDestroy().
- */
- public function testDestroy()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers BudgetController::edit
- * @todo Implement testEdit().
- */
- public function testEdit()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers BudgetController::index
- * @todo Implement testIndex().
- */
- public function testIndex()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers BudgetController::postUpdateIncome
- * @todo Implement testPostUpdateIncome().
- */
- public function testPostUpdateIncome()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers BudgetController::show
- * @todo Implement testShow().
- */
- public function testShow()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers BudgetController::store
- * @todo Implement testStore().
- */
- public function testStore()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers BudgetController::update
- * @todo Implement testUpdate().
- */
- public function testUpdate()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers BudgetController::updateIncome
- * @todo Implement testUpdateIncome().
- */
- public function testUpdateIncome()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/CategoryControllerTest.php b/app/tests/CategoryControllerTest.php
deleted file mode 100644
index b2468dfe3e..0000000000
--- a/app/tests/CategoryControllerTest.php
+++ /dev/null
@@ -1,123 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:03:37.
- */
-class CategoryControllerTest extends TestCase
-{
- /**
- * @var CategoryController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers CategoryController::create
- * @todo Implement testCreate().
- */
- public function testCreate()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers CategoryController::delete
- * @todo Implement testDelete().
- */
- public function testDelete()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers CategoryController::destroy
- * @todo Implement testDestroy().
- */
- public function testDestroy()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers CategoryController::edit
- * @todo Implement testEdit().
- */
- public function testEdit()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers CategoryController::index
- * @todo Implement testIndex().
- */
- public function testIndex()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers CategoryController::show
- * @todo Implement testShow().
- */
- public function testShow()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers CategoryController::store
- * @todo Implement testStore().
- */
- public function testStore()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers CategoryController::update
- * @todo Implement testUpdate().
- */
- public function testUpdate()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/GoogleChartControllerTest.php b/app/tests/GoogleChartControllerTest.php
deleted file mode 100644
index 5ac24dcaec..0000000000
--- a/app/tests/GoogleChartControllerTest.php
+++ /dev/null
@@ -1,195 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:03:44.
- */
-class GoogleChartControllerTest extends TestCase
-{
- /**
- * @var GoogleChartController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers GoogleChartController::accountBalanceChart
- * @todo Implement testAccountBalanceChart().
- */
- public function testAccountBalanceChart()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::accountSankeyInChart
- * @todo Implement testAccountSankeyInChart().
- */
- public function testAccountSankeyInChart()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::accountSankeyOutChart
- * @todo Implement testAccountSankeyOutChart().
- */
- public function testAccountSankeyOutChart()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::allAccountsBalanceChart
- * @todo Implement testAllAccountsBalanceChart().
- */
- public function testAllAccountsBalanceChart()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::allBudgetsHomeChart
- * @todo Implement testAllBudgetsHomeChart().
- */
- public function testAllBudgetsHomeChart()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::allCategoriesHomeChart
- * @todo Implement testAllCategoriesHomeChart().
- */
- public function testAllCategoriesHomeChart()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::budgetLimitSpending
- * @todo Implement testBudgetLimitSpending().
- */
- public function testBudgetLimitSpending()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::budgetsReportChart
- * @todo Implement testBudgetsReportChart().
- */
- public function testBudgetsReportChart()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::componentsAndSpending
- * @todo Implement testComponentsAndSpending().
- */
- public function testComponentsAndSpending()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::piggyBankHistory
- * @todo Implement testPiggyBankHistory().
- */
- public function testPiggyBankHistory()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::recurringOverview
- * @todo Implement testRecurringOverview().
- */
- public function testRecurringOverview()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::recurringTransactionsOverview
- * @todo Implement testRecurringTransactionsOverview().
- */
- public function testRecurringTransactionsOverview()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::yearInExp
- * @todo Implement testYearInExp().
- */
- public function testYearInExp()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers GoogleChartController::yearInExpSum
- * @todo Implement testYearInExpSum().
- */
- public function testYearInExpSum()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/HomeControllerTest.php b/app/tests/HomeControllerTest.php
deleted file mode 100644
index 86bf2218b4..0000000000
--- a/app/tests/HomeControllerTest.php
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:03:51.
- */
-class HomeControllerTest extends TestCase
-{
- /**
- * @var HomeController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- parent::setUp();
- }
-
- /**
- * @covers HomeController::flush
- * @todo Implement testFlush().
- */
- public function testFlush()
- {
-
- $response = $this->call('GET', '/flush');
- $this->assertRedirectedToRoute('index');
- }
-
- /**
- * @covers HomeController::index
- * @todo Implement testIndex().
- */
- public function testIndex()
- {
- $this->be(new User(['email' => '[email protected]']));
-
-
- $response = $this->call('GET', '/');
- $this->assertResponseOk();
-
- $this->assertTrue(true);
- }
- /**
- * @covers HomeController::index
- * @todo Implement testIndex().
- */
- public function testIndexWithAccounts()
- {
- $user = new User(['email' => '[email protected]']);
- $this->be($user);
-
- $pref = new Preference(['user_id' => $user->id,'name' => 'frontpageAccounts', 'data' => [1]]);
- $pref->save();
-
- $response = $this->call('GET', '/');
- $this->assertResponseOk();
- }
-
- /**
- * @covers HomeController::rangeJump
- * @todo Implement testRangeJump().
- */
- public function testRangeJump()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers HomeController::sessionNext
- * @todo Implement testSessionNext().
- */
- public function testSessionNext()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers HomeController::sessionPrev
- * @todo Implement testSessionPrev().
- */
- public function testSessionPrev()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-}
diff --git a/app/tests/JsonControllerTest.php b/app/tests/JsonControllerTest.php
deleted file mode 100644
index d382ae68bd..0000000000
--- a/app/tests/JsonControllerTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:03:56.
- */
-class JsonControllerTest extends TestCase
-{
- /**
- * @var JsonController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers JsonController::categories
- * @todo Implement testCategories().
- */
- public function testCategories()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers JsonController::expenseAccounts
- * @todo Implement testExpenseAccounts().
- */
- public function testExpenseAccounts()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers JsonController::revenueAccounts
- * @todo Implement testRevenueAccounts().
- */
- public function testRevenueAccounts()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/PiggybankControllerTest.php b/app/tests/PiggybankControllerTest.php
deleted file mode 100644
index 53c5a18242..0000000000
--- a/app/tests/PiggybankControllerTest.php
+++ /dev/null
@@ -1,171 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:04:05.
- */
-class PiggybankControllerTest extends TestCase
-{
- /**
- * @var PiggybankController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers PiggybankController::add
- * @todo Implement testAdd().
- */
- public function testAdd()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers PiggybankController::create
- * @todo Implement testCreate().
- */
- public function testCreate()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers PiggybankController::delete
- * @todo Implement testDelete().
- */
- public function testDelete()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers PiggybankController::destroy
- * @todo Implement testDestroy().
- */
- public function testDestroy()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers PiggybankController::edit
- * @todo Implement testEdit().
- */
- public function testEdit()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers PiggybankController::index
- * @todo Implement testIndex().
- */
- public function testIndex()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers PiggybankController::postAdd
- * @todo Implement testPostAdd().
- */
- public function testPostAdd()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers PiggybankController::postRemove
- * @todo Implement testPostRemove().
- */
- public function testPostRemove()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers PiggybankController::remove
- * @todo Implement testRemove().
- */
- public function testRemove()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers PiggybankController::show
- * @todo Implement testShow().
- */
- public function testShow()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers PiggybankController::store
- * @todo Implement testStore().
- */
- public function testStore()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers PiggybankController::update
- * @todo Implement testUpdate().
- */
- public function testUpdate()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/PreferencesControllerTest.php b/app/tests/PreferencesControllerTest.php
deleted file mode 100644
index efbd2f468d..0000000000
--- a/app/tests/PreferencesControllerTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:04:12.
- */
-class PreferencesControllerTest extends TestCase
-{
- /**
- * @var PreferencesController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers PreferencesController::index
- * @todo Implement testIndex().
- */
- public function testIndex()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers PreferencesController::postIndex
- * @todo Implement testPostIndex().
- */
- public function testPostIndex()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/ProfileControllerTest.php b/app/tests/ProfileControllerTest.php
deleted file mode 100644
index 18b1755a3d..0000000000
--- a/app/tests/ProfileControllerTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:04:19.
- */
-class ProfileControllerTest extends TestCase
-{
- /**
- * @var ProfileController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers ProfileController::changePassword
- * @todo Implement testChangePassword().
- */
- public function testChangePassword()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers ProfileController::index
- * @todo Implement testIndex().
- */
- public function testIndex()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers ProfileController::postChangePassword
- * @todo Implement testPostChangePassword().
- */
- public function testPostChangePassword()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/RecurringControllerTest.php b/app/tests/RecurringControllerTest.php
deleted file mode 100644
index ee7cdd6a4a..0000000000
--- a/app/tests/RecurringControllerTest.php
+++ /dev/null
@@ -1,135 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:04:26.
- */
-class RecurringControllerTest extends TestCase
-{
- /**
- * @var RecurringController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers RecurringController::create
- * @todo Implement testCreate().
- */
- public function testCreate()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers RecurringController::delete
- * @todo Implement testDelete().
- */
- public function testDelete()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers RecurringController::destroy
- * @todo Implement testDestroy().
- */
- public function testDestroy()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers RecurringController::edit
- * @todo Implement testEdit().
- */
- public function testEdit()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers RecurringController::index
- * @todo Implement testIndex().
- */
- public function testIndex()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers RecurringController::rescan
- * @todo Implement testRescan().
- */
- public function testRescan()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers RecurringController::show
- * @todo Implement testShow().
- */
- public function testShow()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers RecurringController::store
- * @todo Implement testStore().
- */
- public function testStore()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers RecurringController::update
- * @todo Implement testUpdate().
- */
- public function testUpdate()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/ReminderControllerTest.php b/app/tests/ReminderControllerTest.php
deleted file mode 100644
index 60558fe051..0000000000
--- a/app/tests/ReminderControllerTest.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:04:32.
- */
-class ReminderControllerTest extends TestCase
-{
- /**
- * @var ReminderController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers ReminderController::show
- * @todo Implement testShow().
- */
- public function testShow()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/ReportControllerTest.php b/app/tests/ReportControllerTest.php
deleted file mode 100644
index a2683c423d..0000000000
--- a/app/tests/ReportControllerTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:04:38.
- */
-class ReportControllerTest extends TestCase
-{
- /**
- * @var ReportController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers ReportController::index
- * @todo Implement testIndex().
- */
- public function testIndex()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers ReportController::year
- * @todo Implement testYear().
- */
- public function testYear()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/SearchControllerTest.php b/app/tests/SearchControllerTest.php
deleted file mode 100644
index 3caaeda670..0000000000
--- a/app/tests/SearchControllerTest.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:04:45.
- */
-class SearchControllerTest extends TestCase
-{
- /**
- * @var SearchController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers SearchController::index
- * @todo Implement testIndex().
- */
- public function testIndex()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/TestCase.php b/app/tests/TestCase.php
index f38b1effd9..c0d01d3355 100644
--- a/app/tests/TestCase.php
+++ b/app/tests/TestCase.php
@@ -1,9 +1,11 @@
<?php
+use Mockery as m;
/**
* Class TestCase
*/
-class TestCase extends Illuminate\Foundation\Testing\TestCase {
+class TestCase extends Illuminate\Foundation\Testing\TestCase
+{
/**
* Creates the application.
*
@@ -11,15 +13,38 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase {
*/
public function createApplication()
{
- $unitTesting = true;
+ $unitTesting = true;
$testEnvironment = 'testing';
- return require __DIR__.'/../../bootstrap/start.php';
+
+ return require __DIR__ . '/../../bootstrap/start.php';
}
- public function setUp() {
+ public function setUp()
+ {
parent::setUp();
Artisan::call('migrate');
$this->seed();
+
+
//$this->
}
+
+ public function mock($class)
+ {
+ $mock = Mockery::mock($class);
+
+ $this->app->instance($class, $mock);
+
+ return $mock;
+ }
+
+ static public function setupBeforeClass()
+ {
+ League\FactoryMuffin\Facade::loadFactories(__DIR__ . '/factories');
+ }
+
+ public function tearDown()
+ {
+ m::close();
+ }
}
\ No newline at end of file
diff --git a/app/tests/TransactionControllerTest.php b/app/tests/TransactionControllerTest.php
deleted file mode 100644
index 9d9b5200c8..0000000000
--- a/app/tests/TransactionControllerTest.php
+++ /dev/null
@@ -1,123 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:04:51.
- */
-class TransactionControllerTest extends TestCase
-{
- /**
- * @var TransactionController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers TransactionController::create
- * @todo Implement testCreate().
- */
- public function testCreate()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers TransactionController::delete
- * @todo Implement testDelete().
- */
- public function testDelete()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers TransactionController::destroy
- * @todo Implement testDestroy().
- */
- public function testDestroy()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers TransactionController::edit
- * @todo Implement testEdit().
- */
- public function testEdit()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers TransactionController::index
- * @todo Implement testIndex().
- */
- public function testIndex()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers TransactionController::show
- * @todo Implement testShow().
- */
- public function testShow()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers TransactionController::store
- * @todo Implement testStore().
- */
- public function testStore()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers TransactionController::update
- * @todo Implement testUpdate().
- */
- public function testUpdate()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/UserControllerTest.php b/app/tests/UserControllerTest.php
deleted file mode 100644
index f934b8402a..0000000000
--- a/app/tests/UserControllerTest.php
+++ /dev/null
@@ -1,123 +0,0 @@
-<?php
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2014-11-18 at 09:04:57.
- */
-class UserControllerTest extends TestCase
-{
- /**
- * @var UserController
- */
- protected $object;
-
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- public function setUp()
- {
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-
- /**
- * @covers UserController::login
- * @todo Implement testLogin().
- */
- public function testLogin()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers UserController::logout
- * @todo Implement testLogout().
- */
- public function testLogout()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers UserController::postLogin
- * @todo Implement testPostLogin().
- */
- public function testPostLogin()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers UserController::postRegister
- * @todo Implement testPostRegister().
- */
- public function testPostRegister()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers UserController::postRemindme
- * @todo Implement testPostRemindme().
- */
- public function testPostRemindme()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers UserController::register
- * @todo Implement testRegister().
- */
- public function testRegister()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers UserController::remindme
- * @todo Implement testRemindme().
- */
- public function testRemindme()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers UserController::reset
- * @todo Implement testReset().
- */
- public function testReset()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-}
diff --git a/app/tests/factories/TransactionCurrency.php b/app/tests/factories/TransactionCurrency.php
new file mode 100644
index 0000000000..9804dd56c2
--- /dev/null
+++ b/app/tests/factories/TransactionCurrency.php
@@ -0,0 +1,7 @@
+<?php
+
+League\FactoryMuffin\Facade::define(
+ 'TransactionCurrency', [
+ 'code' => 'word',
+ ]
+);
diff --git a/app/tests/factories/TransactionJournal.php b/app/tests/factories/TransactionJournal.php
new file mode 100644
index 0000000000..58fd89d200
--- /dev/null
+++ b/app/tests/factories/TransactionJournal.php
@@ -0,0 +1,12 @@
+<?php
+
+League\FactoryMuffin\Facade::define(
+ 'TransactionJournal', [
+ 'transaction_type_id' => 'factory|TransactionType',
+ 'transaction_currency_id' => 'factory|TransactionCurrency',
+ 'description' => 'text',
+ 'date' => 'date|Y-m-d',
+ 'completed' => 'boolean',
+ 'user_id' => 'factory|User'
+ ]
+);
diff --git a/app/tests/factories/TransactionType.php b/app/tests/factories/TransactionType.php
new file mode 100644
index 0000000000..0876277d2c
--- /dev/null
+++ b/app/tests/factories/TransactionType.php
@@ -0,0 +1,7 @@
+<?php
+
+League\FactoryMuffin\Facade::define(
+ 'TransactionType', [
+ 'type' => 'word',
+ ]
+);
diff --git a/app/tests/factories/User.php b/app/tests/factories/User.php
new file mode 100644
index 0000000000..c7a74e8e82
--- /dev/null
+++ b/app/tests/factories/User.php
@@ -0,0 +1,8 @@
+<?php
+League\FactoryMuffin\Facade::define(
+ 'User', [
+ 'email' => 'email',
+ 'migrated' => 1,
+ 'password' => 'empty'
+ ]
+);
diff --git a/app/views/budgets/show.blade.php b/app/views/budgets/show.blade.php
index 4af1bea550..3d5b5ec428 100644
--- a/app/views/budgets/show.blade.php
+++ b/app/views/budgets/show.blade.php
@@ -16,9 +16,7 @@
<div class="panel-heading">
Transactions
</div>
- <div class="panel-body">
@include('list.journals-full')
- </div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-5">
diff --git a/app/views/categories/index.blade.php b/app/views/categories/index.blade.php
index 1da13dcf19..e3cef30f53 100644
--- a/app/views/categories/index.blade.php
+++ b/app/views/categories/index.blade.php
@@ -21,9 +21,7 @@
</div>
- <div class="panel-body">
@include('list.categories')
- </div>
</div>
</div>
</div>
diff --git a/app/views/reports/year.blade.php b/app/views/reports/year.blade.php
index ffbd8ab0cc..fbb276668f 100644
--- a/app/views/reports/year.blade.php
+++ b/app/views/reports/year.blade.php
@@ -29,7 +29,6 @@
<div class="panel-heading">
Summary
</div>
- <div class="panel-body">
<table class="table table-striped">
<tr>
<td></td>
@@ -62,7 +61,6 @@
<td>{{mf($inSum + $outSum)}}</td>
</tr>
</table>
- </div>
</div>
</div>
</div>
diff --git a/composer.json b/composer.json
index d1f65f2539..94ebfb25d6 100644
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,9 @@
"barryvdh/laravel-debugbar": "@stable",
"barryvdh/laravel-ide-helper": "@stable",
"doctrine/dbal": "~2.3",
- "satooshi/php-coveralls": "dev-master"
+ "satooshi/php-coveralls": "dev-master",
+ "mockery/mockery": "@stable",
+ "league/factory-muffin": "~2.0"
},
"autoload": {
"classmap": [