Compare commits

...

19 Commits

Author SHA1 Message Date
James Cole
cf00922ad2 Merge branch 'release/3.4.0.4' 2015-05-09 15:13:20 +02:00
James Cole
d07b2e773b Update read me 2015-05-09 15:13:14 +02:00
James Cole
506ef7b0b9 Covered currency repository. 2015-05-09 15:11:12 +02:00
James Cole
2cd5dae8e2 New read me [skip ci] 2015-05-09 15:08:56 +02:00
James Cole
a1cd49c111 First attempt at translations. 2015-05-09 13:56:03 +02:00
James Cole
aca2973aef Experimental chart [skip ci] 2015-05-09 13:55:07 +02:00
James Cole
0a7a691c95 Experimental chart [skip ci] 2015-05-09 13:53:58 +02:00
James Cole
72906a7afd Experimental chart [skip ci] 2015-05-09 13:52:33 +02:00
James Cole
d1a4a83570 Covered category repository. 2015-05-09 13:14:02 +02:00
James Cole
e0396b29e8 Add GA beacon [skip ci] 2015-05-09 10:43:37 +02:00
James Cole
536833cfe0 Fixed tests. 2015-05-09 10:25:52 +02:00
James Cole
317b02d1b9 Finished budget repository tests. 2015-05-09 10:23:13 +02:00
James Cole
75e279ea0d Update read me [skip ci] 2015-05-09 09:17:09 +02:00
James Cole
dc2ad21f4c Updated read me [skip ci] 2015-05-09 09:15:39 +02:00
James Cole
484d49aae1 Fixed tests 2015-05-09 09:15:27 +02:00
James Cole
ca39438ad4 Small update to the read me. [skip ci] 2015-05-09 09:11:54 +02:00
James Cole
49a65ebff4 New budget repository tests. 2015-05-09 09:05:37 +02:00
James Cole
befdc05084 Rewrote read me. [skip ci] 2015-05-08 19:34:03 +02:00
James Cole
1fbffe761b Merge branch 'release/3.4.0.3' into develop 2015-05-08 17:35:03 +02:00
28 changed files with 538 additions and 316 deletions

View File

@@ -1,46 +1,62 @@
Firefly III (v3.4.0.3) # Firefly III
=========== #### v3.4.0.4
[![Build Status](https://travis-ci.org/JC5/firefly-iii.svg?branch=develop)](https://travis-ci.org/JC5/firefly-iii) [![Build Status](https://travis-ci.org/JC5/firefly-iii.svg?branch=develop)](https://travis-ci.org/JC5/firefly-iii)
[![Project Status](http://stillmaintained.com/JC5/firefly-iii.png?a=b)](http://stillmaintained.com/JC5/firefly-iii) [![Project Status](http://stillmaintained.com/JC5/firefly-iii.png?a=b)](http://stillmaintained.com/JC5/firefly-iii)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/d44c7012-5f50-41ad-add8-8445330e4102/mini.png)](https://insight.sensiolabs.com/projects/d44c7012-5f50-41ad-add8-8445330e4102) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/d44c7012-5f50-41ad-add8-8445330e4102/mini.png)](https://insight.sensiolabs.com/projects/d44c7012-5f50-41ad-add8-8445330e4102)
[![Code Climate](https://codeclimate.com/github/JC5/firefly-iii/badges/gpa.svg)](https://codeclimate.com/github/JC5/firefly-iii) [![Code Climate](https://codeclimate.com/github/JC5/firefly-iii/badges/gpa.svg)](https://codeclimate.com/github/JC5/firefly-iii)
[![Coverage Status](https://coveralls.io/repos/JC5/firefly-iii/badge.svg?branch=master)](https://coveralls.io/r/JC5/firefly-iii?branch=master) [![Coverage Status](https://coveralls.io/repos/JC5/firefly-iii/badge.svg?branch=master)](https://coveralls.io/r/JC5/firefly-iii?branch=master)
[![Coverage Status](https://coveralls.io/repos/JC5/firefly-iii/badge.svg?branch=develop)](https://coveralls.io/r/JC5/firefly-iii?branch=develop)
[![Latest Stable Version](https://poser.pugx.org/grumpydictator/firefly-iii/v/stable.svg)](https://packagist.org/packages/grumpydictator/firefly-iii) [![Latest Stable Version](https://poser.pugx.org/grumpydictator/firefly-iii/v/stable.svg)](https://packagist.org/packages/grumpydictator/firefly-iii)
[![Total Downloads](https://poser.pugx.org/grumpydictator/firefly-iii/downloads.svg)](https://packagist.org/packages/grumpydictator/firefly-iii) ![GA](https://ga-beacon.appspot.com/UA-58172398-6/firefly-iii/readme)
[![Latest Unstable Version](https://poser.pugx.org/grumpydictator/firefly-iii/v/unstable.svg)](https://packagist.org/packages/grumpydictator/firefly-iii) ## About
[![License](https://poser.pugx.org/grumpydictator/firefly-iii/license.svg)](https://packagist.org/packages/grumpydictator/firefly-iii)
Firefly III is a tool to help you manage your finances. Please read the full description [in the wiki](https://github.com/JC5/firefly-iii/wiki/full-description). "Firefly III" is a financial manager. It can help you keep track of expenses, income, budgets and everything in between. It even supports credit cards, shared
household accounts and savings accounts! It's pretty fancy. You should use it to save and organise money.
Firefly Mark III is a new version of Firefly built upon best practices and lessons learned Firefly is a system you'll have install yourself on webhosting of your choosing.
from building [Firefly](https://github.com/JC5/Firefly). It's Mark III since the original Firefly never made it outside of my
laptop and [Firefly II](https://github.com/JC5/Firefly) is live.
If you're not sure if this tool is for you, please read the [full description](https://github.com/JC5/firefly-iii/wiki/full-description). Personal financial management is pretty difficult, and everybody has their own approach to it. Some people
make budgets, other people limit their cashflow by throwing away their credit cards, others get a better job.
There are tons of ways to save and earn money.
To install and use Firefly III, please read [the installation guide](https://github.com/JC5/firefly-iii/wiki/Installation),
[the upgrade guide](https://github.com/JC5/firefly-iii/wiki/Upgrade-instructions) (if applicable) and the **[first use guide](https://github.com/JC5/firefly-iii/wiki/First-use)**.
If you want to try out Firefly III, you can do so on [this dedicated website](https://geld.nder.be/). This site always runs the latest version of Firefly III. If you want to use it, please read the [privacy considerations](https://github.com/JC5/firefly-iii/wiki/Privacy-on-demo-site) for this demo-site. To get to know Firefly, and to see if it fits you, check out these resources:
- The screenshots below on this very page.
- The featurelist below, also on this very page.
- The [full description](https://github.com/JC5/firefly-iii/wiki/full-description), which will tell you how Firefly works,
and the philosophy behind it.
### About the name (if you care)
It's III, or 3, because [version 2](https://github.com/JC5/Firefly) and version 1 (not online) preceded it. It has been growing steadily ever since.
## Running and installing
If you're still interested please read [the installation guide](https://github.com/JC5/firefly-iii/wiki/Installation),
[the upgrade guide](https://github.com/JC5/firefly-iii/wiki/Upgrade-instructions) (if applicable)
and the **[first use guide](https://github.com/JC5/firefly-iii/wiki/First-use)**.
If you want to try out Firefly III, you can do so on [this dedicated website](https://geld.nder.be/).
This site always runs the latest version of Firefly III. If you want to use it, please read the [privacy considerations](https://github.com/JC5/firefly-iii/wiki/Privacy-on-demo-site) for this demo-site.
## Current features ## Current features
- [A double-entry bookkeeping system](https://en.wikipedia.org/wiki/Double-entry_bookkeeping_system); - [A double-entry bookkeeping system](https://en.wikipedia.org/wiki/Double-entry_bookkeeping_system);
- You can store, edit and remove withdrawals, deposits and transfers. This allows you full financial management; - You can store, edit and remove [withdrawals, deposits and transfers](https://en.wikipedia.org/wiki/Financial_transaction). This allows you full financial management;
- You can manage different types of accounts - You can manage different types of accounts
- Asset accounts - [Asset](https://en.wikipedia.org/wiki/Asset) accounts
- Shared asset accounts (household accounts) - Shared [asset accounts](https://en.wikipedia.org/wiki/Asset) ([household accounts](https://en.wikipedia.org/wiki/Household))
- Saving accounts - Saving accounts
- Credit cards - Credit cards
- It's possible to create, change and manage money using _[budgets](https://en.wikipedia.org/wiki/Envelope_system)_; - It's possible to create, change and manage money using _[budgets](https://en.wikipedia.org/wiki/Envelope_system)_;
- Organize transactions using categories; - Organize transactions using categories;
- Save towards a goal using piggy banks; - Save towards a goal using [piggy banks](https://en.wikipedia.org/wiki/Piggy_bank);
- Predict and anticipate bills; - Predict and anticipate [bills](https://en.wikipedia.org/wiki/Invoice);
- View income / expense reports; - View income / expense [reports](https://en.wikipedia.org/wiki/Financial_statement);
- Lots of help text in case you don't get it; - Organize expenses using tags;
- Lots of help text in case you don't get it.
Everything is organised: Everything is organised:
@@ -50,24 +66,10 @@ Everything is organised:
- Lots of charts because we all love them. - Lots of charts because we all love them.
- Financial reporting showing you how well you are doing; - Financial reporting showing you how well you are doing;
## Changes
Firefly III will feature, but does not feature yet:
- More control over other resources outside of personal finance
- Debts
- More test-coverage;
- Firefly will be able to split transactions; a single purchase can be split in multiple entries, for more fine-grained control.
- Firefly will be able to join transactions.
- Any other features I might not have thought of.
Some stuff has been removed:
- The nesting of budgets, categories and beneficiaries is removed because it was pretty pointless.
## Screenshots ## Screenshots
_Please note that everything in these screenshots is fictional and may not be realistic._
![Index](https://i.nder.be/c09vfw90) ![Index](https://i.nder.be/c09vfw90)
![Accounts](https://i.nder.be/hkn0vhcg) ![Accounts](https://i.nder.be/hkn0vhcg)
@@ -83,6 +85,10 @@ Some stuff has been removed:
![Piggy banks](https://i.nder.be/hkud0h53) ![Piggy banks](https://i.nder.be/hkud0h53)
## Current state ## Current state
I have the basics up and running. Test coverage is currently coming, slowly.
Questions, ideas or other things to contribute? [Let me know](https://github.com/JC5/firefly-iii/issues/new)! Firefly III is pretty much all grown up. Full test coverage (nerd alert!) is coming. One of the things on the todo-list
is adding translations.
Questions, ideas, bugs or other things to contribute? [Let me know](https://github.com/JC5/firefly-iii/issues/new)!
If you like this tool, feel free to [donate me some beer money](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=2ZMV952UUSCLU&lc=NL&item_name=Development%20of%20Firefly&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted).

View File

@@ -149,6 +149,7 @@ class GoogleChartController extends Controller
{ {
$chart->addColumn('Budget', 'string'); $chart->addColumn('Budget', 'string');
$chart->addColumn('Left', 'number'); $chart->addColumn('Left', 'number');
$chart->addColumn('Spent', 'number');
$chart->addColumn('Overspent', 'number'); $chart->addColumn('Overspent', 'number');
$budgets = $repository->getBudgets(); $budgets = $repository->getBudgets();
@@ -160,31 +161,43 @@ class GoogleChartController extends Controller
$repetitions = $repository->getBudgetLimitRepetitions($budget, $start, $end); $repetitions = $repository->getBudgetLimitRepetitions($budget, $start, $end);
if ($repetitions->count() == 0) { if ($repetitions->count() == 0) {
$expenses = $repository->sumBudgetExpensesInPeriod($budget, $start, $end); $expenses = $repository->sumBudgetExpensesInPeriod($budget, $start, $end);
$allEntries->push([$budget->name, 0, $expenses]); $allEntries->push([$budget->name, 0, 0, $expenses]);
continue; continue;
} }
/** @var LimitRepetition $repetition */ /** @var LimitRepetition $repetition */
foreach ($repetitions as $repetition) { foreach ($repetitions as $repetition) {
$expenses = $repository->sumBudgetExpensesInPeriod($budget, $repetition->startdate, $repetition->enddate); $expenses = $repository->sumBudgetExpensesInPeriod($budget, $repetition->startdate, $repetition->enddate);
$allEntries->push([$budget->name . ' (' . $repetition->startdate->format('j M Y') . ')', floatval($repetition->amount), $expenses]); $left = $expenses < floatval($repetition->amount) ? floatval($repetition->amount) - $expenses : 0;
$spent = $expenses > floatval($repetition->amount) ? 0 : $expenses;
$overspent = $expenses > floatval($repetition->amount) ? $expenses - floatval($repetition->amount) : 0;
$allEntries->push(
[$budget->name . ' (' . $repetition->startdate->format('j M Y') . ')',
$left,
$spent,
$overspent
]
);
} }
} }
$noBudgetExpenses = $repository->getWithoutBudgetSum($start, $end); $noBudgetExpenses = $repository->getWithoutBudgetSum($start, $end);
$allEntries->push(['(no budget)', 0, $noBudgetExpenses]); $allEntries->push(['(no budget)', 0, 0, $noBudgetExpenses]);
foreach ($allEntries as $entry) { foreach ($allEntries as $entry) {
if ($entry[2] > 0) { if ($entry[1] != 0 || $entry[2] != 0 || $entry[3] != 0) {
$left = $entry[1] - $entry[2]; $chart->addRow($entry[0], $entry[1], $entry[2], $entry[3]);
if ($left > 0) {
$chart->addRow($entry[0], $left, null);
} else {
if ($left < 0) {
$chart->addRow($entry[0], null, $left);
}
}
} }
// if ($entry[2] > 0) {
// $left = $entry[1] - $entry[2];
// if ($left > 0) {
// $chart->addRow($entry[0], $left, null);
// } else {
// if ($left < 0) {
// $chart->addRow($entry[0], null, $left);
// }
// }
//
// }
} }
$chart->generate(); $chart->generate();

View File

@@ -25,21 +25,6 @@ class BudgetRepository implements BudgetRepositoryInterface
*/ */
public function cleanupBudgets() public function cleanupBudgets()
{ {
$limits = BudgetLimit::leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id')->get(['budget_limits.*']);
// loop budget limits:
$found = [];
/** @var BudgetLimit $limit */
foreach ($limits as $limit) {
$key = $limit->budget_id . '-' . $limit->startdate;
if (isset($found[$key])) {
$limit->delete();
} else {
$found[$key] = true;
}
unset($key);
}
// delete limits with amount 0: // delete limits with amount 0:
BudgetLimit::where('amount', 0)->delete(); BudgetLimit::where('amount', 0)->delete();

View File

@@ -3,7 +3,8 @@ google.setOnLoadCallback(drawChart);
function drawChart() { function drawChart() {
googleLineChart('chart/home/account', 'accounts-chart'); googleLineChart('chart/home/account', 'accounts-chart');
googleColumnChart('chart/home/budgets', 'budgets-chart'); //googleColumnChart('chart/home/budgets', 'budgets-chart');
googleStackedColumnChart('chart/home/budgets', 'budgets-chart');
googleColumnChart('chart/home/categories', 'categories-chart'); googleColumnChart('chart/home/categories', 'categories-chart');
googlePieChart('chart/home/bills', 'bills-chart'); googlePieChart('chart/home/bills', 'bills-chart');
getBoxAmounts(); getBoxAmounts();

View File

@@ -0,0 +1,10 @@
<?php
return [
'welcome' => 'Welcome to Firefly!',
'mainTitle' => 'What\'s playing?',
'close' => 'Clone',
'pleaseHold' => 'Please hold...',
'mandatoryFields' => 'Mandatory fields',
'optionalFields' => 'Optional fields',
'options' => 'Options'
];

View File

@@ -9,7 +9,7 @@
<div class="col-lg-6 col-md-6 col-sm-12"> <div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa {{ subTitleIcon }}"></i> Mandatory fields <i class="fa {{ subTitleIcon }}"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.text('name') }} {{ ExpandedForm.text('name') }}
@@ -22,7 +22,7 @@
{% if what == 'asset' %} {% if what == 'asset' %}
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-smile-o"></i> Optional fields <i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
@@ -35,10 +35,9 @@
</div> </div>
{% endif %} {% endif %}
<!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('create','account') }} {{ ExpandedForm.optionsList('create','account') }}

View File

@@ -9,7 +9,7 @@
<div class="col-lg-6 col-md-6 col-sm-12"> <div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa {{ subTitleIcon }}"></i> Mandatory fields <i class="fa {{ subTitleIcon }}"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.text('name') }} {{ ExpandedForm.text('name') }}
@@ -20,7 +20,7 @@
<div class="col-lg-6 col-md-6 col-sm-12"> <div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-smile-o"></i> Optional fields <i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %} {% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %}
@@ -50,7 +50,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('update','account') }} {{ ExpandedForm.optionsList('update','account') }}

View File

@@ -5,10 +5,9 @@
<div class="row"> <div class="row">
<div class="col-lg-6 col-md-12 col-sm-6"> <div class="col-lg-6 col-md-12 col-sm-6">
<!-- panel for mandatory fields -->
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-exclamation-circle"></i> Mandatory fields <i class="fa fa-exclamation-circle"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.text('name') }} {{ ExpandedForm.text('name') }}
@@ -22,10 +21,9 @@
</div> </div>
<div class="col-lg-6 col-md-12 col-sm-6"> <div class="col-lg-6 col-md-12 col-sm-6">
<!-- panel for optional fields -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-smile-o"></i> Optional fields <i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.integer('skip',0) }} {{ ExpandedForm.integer('skip',0) }}
@@ -37,7 +35,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('create','bill') }} {{ ExpandedForm.optionsList('create','bill') }}

View File

@@ -9,7 +9,7 @@
<div class="col-lg-6 col-md-12 col-sm-6"> <div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-exclamation-circle"></i> Mandatory fields <i class="fa fa-exclamation-circle"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.text('name') }} {{ ExpandedForm.text('name') }}
@@ -26,7 +26,7 @@
<div class="col-lg-6 col-md-12 col-sm-6"> <div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-smile-o"></i> Optional fields <i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.integer('skip') }} {{ ExpandedForm.integer('skip') }}
@@ -37,7 +37,7 @@
</div> </div>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('update','bill') }} {{ ExpandedForm.optionsList('update','bill') }}

View File

@@ -6,7 +6,7 @@
<div class="col-lg-6 col-md-6 col-sm-12"> <div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-exclamation"></i> Mandatory fields <i class="fa fa-exclamation"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.text('name') }} {{ ExpandedForm.text('name') }}
@@ -17,7 +17,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('create','budget') }} {{ ExpandedForm.optionsList('create','budget') }}

View File

@@ -13,7 +13,7 @@
<div class="col-lg-6 col-md-12 col-sm-6"> <div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-fw fa-exclamation"></i> Mandatory fields <i class="fa fa-fw fa-exclamation"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.checkbox('active') }} {{ ExpandedForm.checkbox('active') }}
@@ -26,7 +26,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('update','budget') }} {{ ExpandedForm.optionsList('update','budget') }}

View File

@@ -7,7 +7,7 @@
<div class="col-lg-6 col-md-6 col-sm-12"> <div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-exclamation"></i> Mandatory fields <i class="fa fa-exclamation"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.text('name') }} {{ ExpandedForm.text('name') }}
@@ -20,7 +20,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('create','category') }} {{ ExpandedForm.optionsList('create','category') }}

View File

@@ -7,7 +7,7 @@
<div class="col-lg-6 col-md-6 col-sm-12"> <div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-exclamation"></i> Mandatory fields <i class="fa fa-exclamation"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.text('name') }} {{ ExpandedForm.text('name') }}
@@ -21,7 +21,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('update','category') }} {{ ExpandedForm.optionsList('update','category') }}

View File

@@ -6,7 +6,7 @@
<div class="col-lg-6 col-md-6 col-sm-12"> <div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa {{ subTitleIcon }}"></i> Mandatory fields <i class="fa {{ subTitleIcon }}"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.text('name',null,{'maxlength' : 48}) }} {{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}
@@ -22,7 +22,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('create','currency') }} {{ ExpandedForm.optionsList('create','currency') }}

View File

@@ -8,7 +8,7 @@
<div class="col-lg-6 col-md-6 col-sm-12"> <div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa {{ subTitleIcon }}"></i> Mandatory fields <i class="fa {{ subTitleIcon }}"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.text('name',null,{'maxlength' : 48}) }} {{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}
@@ -23,7 +23,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('update','currency') }} {{ ExpandedForm.optionsList('update','currency') }}

View File

@@ -5,7 +5,7 @@
{% if count == 0 %} {% if count == 0 %}
<div class="row"> <div class="row">
<div class="col-lg-12 col-md-12 col-sm-12"> <div class="col-lg-12 col-md-12 col-sm-12">
<p class="lead">Welcome to Firefly III.</p> <p class="lead">{{ trans('firefly.welcome') }}</p>
<p> <p>
Create a new asset account to get started. Create a new asset account to get started.

View File

@@ -89,15 +89,15 @@
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">{{ trans('firefly.close') }}</span>
</button> </button>
<h4 class="modal-title" id="helpTitle">Please hold...</h4> <h4 class="modal-title" id="helpTitle">{{ trans('firefly.pleaseHold') }}</h4>
</div> </div>
<div class="modal-body" id="helpBody"> <div class="modal-body" id="helpBody">
<i class="fa fa-refresh fa-spin"></i> <i class="fa fa-refresh fa-spin"></i>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('firefly.close') }}</button>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -8,7 +8,7 @@
<div class="col-lg-6 col-md-12 col-sm-6"> <div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-fw fa-exclamation"></i> Mandatory fields <i class="fa fa-fw fa-exclamation"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
@@ -20,10 +20,9 @@
</div> </div>
</div> </div>
<div class="col-lg-6 col-md-12 col-sm-12"> <div class="col-lg-6 col-md-12 col-sm-12">
<!-- panel for optional fields -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-smile-o"></i> Optional fields <i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.date('targetdate') }} {{ ExpandedForm.date('targetdate') }}
@@ -35,7 +34,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('create','piggy bank') }} {{ ExpandedForm.optionsList('create','piggy bank') }}

View File

@@ -10,7 +10,7 @@
<div class="col-lg-6 col-md-12 col-sm-6"> <div class="col-lg-6 col-md-12 col-sm-6">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-fw fa-exclamation"></i> Mandatory fields <i class="fa fa-fw fa-exclamation"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
@@ -23,10 +23,9 @@
</div> </div>
<div class="col-lg-6 col-md-12 col-sm-12"> <div class="col-lg-6 col-md-12 col-sm-12">
<!-- panel for optional fields -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-smile-o"></i> Optional fields <i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.date('targetdate') }} {{ ExpandedForm.date('targetdate') }}
@@ -38,7 +37,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('update','piggy bank') }} {{ ExpandedForm.optionsList('update','piggy bank') }}

View File

@@ -7,7 +7,7 @@
<div class="col-lg-5 col-md-5 col-sm-12"> <div class="col-lg-5 col-md-5 col-sm-12">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-tag"></i> Mandatory fields <i class="fa fa-tag"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.text('tag') }} {{ ExpandedForm.text('tag') }}
@@ -20,7 +20,7 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-smile-o"></i> Optional fields <i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.date('date') }} {{ ExpandedForm.date('date') }}
@@ -32,7 +32,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('create','tag') }} {{ ExpandedForm.optionsList('create','tag') }}

View File

@@ -9,7 +9,7 @@
<div class="col-lg-5 col-md-5 col-sm-12"> <div class="col-lg-5 col-md-5 col-sm-12">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-tag"></i> Mandatory fields <i class="fa fa-tag"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.text('tag') }} {{ ExpandedForm.text('tag') }}
@@ -22,7 +22,7 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-smile-o"></i> Optional fields <i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.date('date') }} {{ ExpandedForm.date('date') }}
@@ -34,7 +34,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('update','tag') }} {{ ExpandedForm.optionsList('update','tag') }}

View File

@@ -6,10 +6,9 @@
<input type="hidden" name="what" value="{{ what }}" /> <input type="hidden" name="what" value="{{ what }}" />
<div class="row"> <div class="row">
<div class="col-lg-6 col-md-12 col-sm-12"> <div class="col-lg-6 col-md-12 col-sm-12">
<!-- panel for mandatory fields -->
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-exclamation-circle"></i> Mandatory fields <i class="fa fa-exclamation-circle"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
<!-- DESCRIPTION ALWAYS AVAILABLE --> <!-- DESCRIPTION ALWAYS AVAILABLE -->
@@ -46,10 +45,9 @@
</div> </div>
</div> </div>
<div class="col-lg-6 col-md-12 col-sm-12"> <div class="col-lg-6 col-md-12 col-sm-12">
<!-- panel for optional fields -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-smile-o"></i> Optional fields <i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
<!-- BUDGET ONLY WHEN CREATING A WITHDRAWAL --> <!-- BUDGET ONLY WHEN CREATING A WITHDRAWAL -->
@@ -73,7 +71,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('create','transaction') }} {{ ExpandedForm.optionsList('create','transaction') }}

View File

@@ -5,7 +5,6 @@
<div class="row"> <div class="row">
<div class="col-lg-6 col-md-6 col-sm-12"> <div class="col-lg-6 col-md-6 col-sm-12">
<!-- panel for mandatory fields -->
<div class="panel panel-danger"> <div class="panel panel-danger">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-exclamation-circle"></i> Destroy "{{ journal.description }}" <i class="fa fa-exclamation-circle"></i> Destroy "{{ journal.description }}"

View File

@@ -8,10 +8,9 @@
<div class="row"> <div class="row">
<div class="col-lg-6 col-md-12 col-sm-12"> <div class="col-lg-6 col-md-12 col-sm-12">
<!-- panel for mandatory fields -->
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-exclamation-circle"></i> Mandatory fields <i class="fa fa-exclamation-circle"></i> {{ trans('firefly.mandatoryFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
<!-- ALWAYS AVAILABLE --> <!-- ALWAYS AVAILABLE -->
@@ -48,10 +47,9 @@
</div> </div>
<div class="col-lg-6 col-md-12 col-sm-12"> <div class="col-lg-6 col-md-12 col-sm-12">
<!-- panel for optional fields -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-smile-o"></i> Optional fields <i class="fa fa-smile-o"></i> {{ trans('firefly.optionalFields') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
<!-- BUDGET ONLY WHEN CREATING A WITHDRAWAL --> <!-- BUDGET ONLY WHEN CREATING A WITHDRAWAL -->
@@ -76,7 +74,7 @@
<!-- panel for options --> <!-- panel for options -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-bolt"></i> Options <i class="fa fa-bolt"></i> {{ trans('firefly.options') }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{{ ExpandedForm.optionsList('update','transaction') }} {{ ExpandedForm.optionsList('update','transaction') }}

View File

@@ -1,7 +1,6 @@
<?php <?php
use League\FactoryMuffin\Facade as FactoryMuffin; use League\FactoryMuffin\Facade as FactoryMuffin;
if (!class_exists('RandomString')) { if (!class_exists('RandomString')) {
/** /**
* Class RandomString * Class RandomString
@@ -140,7 +139,9 @@ FactoryMuffin::define(
'budget_limit_id' => 'factory|FireflyIII\Models\BudgetLimit', 'budget_limit_id' => 'factory|FireflyIII\Models\BudgetLimit',
'startdate' => 'date', 'startdate' => 'date',
'enddate' => 'date', 'enddate' => 'date',
'amount' => 'integer', 'amount' => function () {
return rand(1, 100);
},
] ]
); );
@@ -149,7 +150,9 @@ FactoryMuffin::define(
[ [
'budget_id' => 'factory|FireflyIII\Models\Budget', 'budget_id' => 'factory|FireflyIII\Models\Budget',
'startdate' => 'date', 'startdate' => 'date',
'amount' => 'integer', 'amount' => function () {
return rand(1, 100);
},
'repeats' => 'false', 'repeats' => 'false',
'repeat_freq' => 'monthly', 'repeat_freq' => 'monthly',
@@ -220,7 +223,9 @@ FactoryMuffin::define(
[ [
'account_id' => 'factory|FireflyIII\Models\Account', 'account_id' => 'factory|FireflyIII\Models\Account',
'name' => 'sentence', 'name' => 'sentence',
'targetamount' => 'integer', 'targetamount' => function () {
return rand(1, 100);
},
'startdate' => 'date', 'startdate' => 'date',
'targetdate' => 'date', 'targetdate' => 'date',
'reminder_skip' => 0, 'reminder_skip' => 0,

View File

@@ -1,5 +1,10 @@
<?php <?php
use Carbon\Carbon;
use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit;
use FireflyIII\Repositories\Budget\BudgetRepository; use FireflyIII\Repositories\Budget\BudgetRepository;
use Illuminate\Pagination\LengthAwarePaginator;
use League\FactoryMuffin\Facade as FactoryMuffin;
/** /**
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:16:07. * Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:16:07.
@@ -32,14 +37,23 @@ class BudgetRepositoryTest extends TestCase
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::cleanupBudgets * @covers FireflyIII\Repositories\Budget\BudgetRepository::cleanupBudgets
* @todo Implement testCleanupBudgets().
*/ */
public function testCleanupBudgets() public function testCleanupBudgets()
{ {
// Remove the following lines when you implement this test. // create some budgets:
$this->markTestIncomplete( for ($i = 0; $i < 3; $i++) {
'This test has not been implemented yet.' $budget = FactoryMuffin::create('FireflyIII\Models\Budget');
); $limit = FactoryMuffin::create('FireflyIII\Models\BudgetLimit');
$limit->budget_id = $budget->id;
$limit->amount = 0;
$limit->save();
}
$this->object->cleanupBudgets();
$this->assertCount(0, BudgetLimit::get());
} }
/** /**
@@ -48,10 +62,11 @@ class BudgetRepositoryTest extends TestCase
*/ */
public function testDestroy() public function testDestroy()
{ {
// Remove the following lines when you implement this test. $budget = FactoryMuffin::create('FireflyIII\Models\Budget');
$this->markTestIncomplete(
'This test has not been implemented yet.' $this->object->destroy($budget);
);
$this->assertCount(0, Budget::where('id', $budget->id)->whereNull('deleted_at')->get());
} }
/** /**
@@ -60,213 +75,311 @@ class BudgetRepositoryTest extends TestCase
*/ */
public function testExpensesOnDay() public function testExpensesOnDay()
{ {
// Remove the following lines when you implement this test. $budget = FactoryMuffin::create('FireflyIII\Models\Budget');
$this->markTestIncomplete(
'This test has not been implemented yet.' $result = $this->object->expensesOnDay($budget, new Carbon);
);
$this->assertEquals(0, $result);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getActiveBudgets * @covers FireflyIII\Repositories\Budget\BudgetRepository::getActiveBudgets
* @todo Implement testGetActiveBudgets().
*/ */
public function testGetActiveBudgets() public function testGetActiveBudgets()
{ {
// Remove the following lines when you implement this test. $budget1 = FactoryMuffin::create('FireflyIII\Models\Budget');
$this->markTestIncomplete( $budget2 = FactoryMuffin::create('FireflyIII\Models\Budget');
'This test has not been implemented yet.' $budget1->active = 1;
); $budget2->active = 0;
$budget2->user_id = $budget1->user_id;
$budget1->save();
$budget2->save();
$this->be($budget1->user);
$set = $this->object->getActiveBudgets();
$this->assertCount(1, $set);
$this->assertEquals($set->first()->id, $budget1->id);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getBudgetLimitRepetitions * @covers FireflyIII\Repositories\Budget\BudgetRepository::getBudgetLimitRepetitions
* @todo Implement testGetBudgetLimitRepetitions().
*/ */
public function testGetBudgetLimitRepetitions() public function testGetBudgetLimitRepetitions()
{ {
// Remove the following lines when you implement this test. $rep = FactoryMuffin::create('FireflyIII\Models\LimitRepetition');
$this->markTestIncomplete( $limit = $rep->budgetlimit;
'This test has not been implemented yet.' $limit->startdate = new Carbon('2015-02-02');
); $rep->startdate = new Carbon('2015-02-02');
$rep->enddate = new Carbon('2015-02-28');
$limit->save();
$rep->save();
$set = $this->object->getBudgetLimitRepetitions($rep->budgetlimit->budget, new Carbon('2015-02-01'), new Carbon('2015-02-28'));
$this->assertCount(2, $set);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getBudgetLimits * @covers FireflyIII\Repositories\Budget\BudgetRepository::getBudgetLimits
* @todo Implement testGetBudgetLimits().
*/ */
public function testGetBudgetLimits() public function testGetBudgetLimits()
{ {
// Remove the following lines when you implement this test. /** @var Budget $budget */
$this->markTestIncomplete( $budget = FactoryMuffin::create('FireflyIII\Models\Budget');
'This test has not been implemented yet.' $set = $this->object->getBudgetLimits($budget);
);
$this->assertCount(0, $set);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getBudgets * @covers FireflyIII\Repositories\Budget\BudgetRepository::getBudgets
* @todo Implement testGetBudgets().
*/ */
public function testGetBudgets() public function testGetBudgets()
{ {
// Remove the following lines when you implement this test. $budget1 = FactoryMuffin::create('FireflyIII\Models\Budget');
$this->markTestIncomplete( $budget2 = FactoryMuffin::create('FireflyIII\Models\Budget');
'This test has not been implemented yet.' $budget1->active = 1;
); $budget2->active = 0;
$budget2->user_id = $budget1->user_id;
$budget1->save();
$budget2->save();
$this->be($budget1->user);
$set = $this->object->getBudgets();
$this->assertCount(2, $set);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getCurrentRepetition * @covers FireflyIII\Repositories\Budget\BudgetRepository::getCurrentRepetition
* @todo Implement testGetCurrentRepetition().
*/ */
public function testGetCurrentRepetition() public function testGetCurrentRepetition()
{ {
// Remove the following lines when you implement this test. /** @var Budget $budget */
$this->markTestIncomplete( $budget = FactoryMuffin::create('FireflyIII\Models\Budget');
'This test has not been implemented yet.' $rep = $this->object->getCurrentRepetition($budget, new Carbon);
); $this->assertNull($rep);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getFirstBudgetLimitDate * @covers FireflyIII\Repositories\Budget\BudgetRepository::getFirstBudgetLimitDate
* @todo Implement testGetFirstBudgetLimitDate().
*/ */
public function testGetFirstBudgetLimitDate() public function testGetFirstBudgetLimitDate()
{ {
// Remove the following lines when you implement this test. /** @var BudgetLimit $budget */
$this->markTestIncomplete( $limit = FactoryMuffin::create('FireflyIII\Models\BudgetLimit');
'This test has not been implemented yet.' $date = $this->object->getFirstBudgetLimitDate($limit->budget);
); $this->assertEquals($date->format('Y-m-d'), $limit->startdate->format('Y-m-d'));
}
/**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getFirstBudgetLimitDate
*/
public function testGetFirstBudgetLimitDateNull()
{
/** @var Budget $budget */
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
$date = $this->object->getFirstBudgetLimitDate($budget);
$ownDate = Carbon::now()->startOfYear();
$this->assertEquals($date->format('Y-m-d'), $ownDate->format('Y-m-d'));
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getInactiveBudgets * @covers FireflyIII\Repositories\Budget\BudgetRepository::getInactiveBudgets
* @todo Implement testGetInactiveBudgets().
*/ */
public function testGetInactiveBudgets() public function testGetInactiveBudgets()
{ {
// Remove the following lines when you implement this test. $budget1 = FactoryMuffin::create('FireflyIII\Models\Budget');
$this->markTestIncomplete( $budget2 = FactoryMuffin::create('FireflyIII\Models\Budget');
'This test has not been implemented yet.' $budget1->active = 1;
); $budget2->active = 0;
$budget2->user_id = $budget1->user_id;
$budget1->save();
$budget2->save();
$this->be($budget1->user);
$set = $this->object->getInactiveBudgets();
$this->assertCount(1, $set);
$this->assertEquals($set->first()->id, $budget2->id);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getJournals * @covers FireflyIII\Repositories\Budget\BudgetRepository::getJournals
* @todo Implement testGetJournals().
*/ */
public function testGetJournals() public function testGetJournals()
{ {
// Remove the following lines when you implement this test. $repetition = FactoryMuffin::create('FireflyIII\Models\LimitRepetition');
$this->markTestIncomplete(
'This test has not been implemented yet.' $set = $this->object->getJournals($repetition->budgetlimit->budget, $repetition);
); $this->assertTrue($set instanceof LengthAwarePaginator);
$this->assertCount(0, $set);
$this->assertEquals(1, $set->currentPage());
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getLastBudgetLimitDate * @covers FireflyIII\Repositories\Budget\BudgetRepository::getLastBudgetLimitDate
* @todo Implement testGetLastBudgetLimitDate().
*/ */
public function testGetLastBudgetLimitDate() public function testGetLastBudgetLimitDate()
{ {
// Remove the following lines when you implement this test. /** @var BudgetLimit $budget */
$this->markTestIncomplete( $limit = FactoryMuffin::create('FireflyIII\Models\BudgetLimit');
'This test has not been implemented yet.' $date = $this->object->getLastBudgetLimitDate($limit->budget);
); $this->assertEquals($date->format('Y-m-d'), $limit->startdate->format('Y-m-d'));
}
/**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getLastBudgetLimitDate
*/
public function testGetLastBudgetLimitDateNull()
{
/** @var Budget $budget */
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
$date = $this->object->getLastBudgetLimitDate($budget);
$ownDate = Carbon::now()->startOfYear();
$this->assertEquals($date->format('Y-m-d'), $ownDate->format('Y-m-d'));
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getLimitAmountOnDate * @covers FireflyIII\Repositories\Budget\BudgetRepository::getLimitAmountOnDate
* @todo Implement testGetLimitAmountOnDate().
*/ */
public function testGetLimitAmountOnDate() public function testGetLimitAmountOnDate()
{ {
// Remove the following lines when you implement this test. $rep = FactoryMuffin::create('FireflyIII\Models\LimitRepetition');
$this->markTestIncomplete(
'This test has not been implemented yet.' $amount = $this->object->getLimitAmountOnDate($rep->budgetlimit->budget, $rep->startdate);
);
$this->assertEquals($rep->amount, $amount);
}
/**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getLimitAmountOnDate
*/
public function testGetLimitAmountOnDateNull()
{
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
$amount = $this->object->getLimitAmountOnDate($budget, new Carbon);
$this->assertNull($amount);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getWithoutBudget * @covers FireflyIII\Repositories\Budget\BudgetRepository::getWithoutBudget
* @todo Implement testGetWithoutBudget().
*/ */
public function testGetWithoutBudget() public function testGetWithoutBudget()
{ {
// Remove the following lines when you implement this test. $user = FactoryMuffin::create('FireflyIII\User');
$this->markTestIncomplete( $this->be($user);
'This test has not been implemented yet.' $set = $this->object->getWithoutBudget(new Carbon, new Carbon);
); $this->assertCount(0, $set);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::getWithoutBudgetSum * @covers FireflyIII\Repositories\Budget\BudgetRepository::getWithoutBudgetSum
* @todo Implement testGetWithoutBudgetSum().
*/ */
public function testGetWithoutBudgetSum() public function testGetWithoutBudgetSum()
{ {
// Remove the following lines when you implement this test. $user = FactoryMuffin::create('FireflyIII\User');
$this->markTestIncomplete( $this->be($user);
'This test has not been implemented yet.' $sum = $this->object->getWithoutBudgetSum(new Carbon, new Carbon);
); $this->assertEquals(0, $sum);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::spentInMonth * @covers FireflyIII\Repositories\Budget\BudgetRepository::spentInMonth
* @todo Implement testSpentInMonth().
*/ */
public function testSpentInMonth() public function testSpentInMonth()
{ {
// Remove the following lines when you implement this test. $budget = FactoryMuffin::create('FireflyIII\Models\Budget');
$this->markTestIncomplete(
'This test has not been implemented yet.' $amount = $this->object->spentInMonth($budget, new Carbon);
); $this->assertEquals(0, $amount);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::store * @covers FireflyIII\Repositories\Budget\BudgetRepository::store
* @todo Implement testStore().
*/ */
public function testStore() public function testStore()
{ {
// Remove the following lines when you implement this test. $user = FactoryMuffin::create('FireflyIII\User');
$this->markTestIncomplete(
'This test has not been implemented yet.' $data = [
); 'name' => 'new budget ' . rand(1, 100),
'user' => $user->id
];
$result = $this->object->store($data);
$this->assertTrue($result instanceof Budget);
$this->assertEquals($result->name, $data['name']);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::sumBudgetExpensesInPeriod * @covers FireflyIII\Repositories\Budget\BudgetRepository::sumBudgetExpensesInPeriod
* @todo Implement testSumBudgetExpensesInPeriod().
*/ */
public function testSumBudgetExpensesInPeriod() public function testSumBudgetExpensesInPeriod()
{ {
// Remove the following lines when you implement this test. $budget = FactoryMuffin::create('FireflyIII\Models\Budget');
$this->markTestIncomplete( $result = $this->object->sumBudgetExpensesInPeriod($budget, new Carbon, new Carbon);
'This test has not been implemented yet.' $this->assertEquals(0, $result);
);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::update * @covers FireflyIII\Repositories\Budget\BudgetRepository::update
* @todo Implement testUpdate().
*/ */
public function testUpdate() public function testUpdate()
{ {
// Remove the following lines when you implement this test. $budget = FactoryMuffin::create('FireflyIII\Models\Budget');
$this->markTestIncomplete(
'This test has not been implemented yet.' $data = [
); 'name' => 'update budget ' . rand(1, 100),
'active' => true
];
$result = $this->object->update($budget, $data);
$this->assertTrue($result instanceof Budget);
$this->assertEquals($result->name, $data['name']);
$this->assertEquals($result->id, $budget->id);
} }
/** /**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::updateLimitAmount * @covers FireflyIII\Repositories\Budget\BudgetRepository::updateLimitAmount
* @todo Implement testUpdateLimitAmount().
*/ */
public function testUpdateLimitAmount() public function testUpdateLimitAmount()
{ {
// Remove the following lines when you implement this test. $budget = FactoryMuffin::create('FireflyIII\Models\Budget');
$this->markTestIncomplete(
'This test has not been implemented yet.' $result = $this->object->updateLimitAmount($budget, new Carbon, 100);
);
$this->assertTrue($result instanceof BudgetLimit);
$this->assertEquals($result->amount, 100);
}
/**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::updateLimitAmount
*/
public function testUpdateLimitAmountExisting()
{
$budgetLimit= FactoryMuffin::create('FireflyIII\Models\BudgetLimit');
$result = $this->object->updateLimitAmount($budgetLimit->budget, $budgetLimit->startdate, 100);
$this->assertTrue($result instanceof BudgetLimit);
$this->assertEquals($result->amount, 100);
}
/**
* @covers FireflyIII\Repositories\Budget\BudgetRepository::updateLimitAmount
*/
public function testUpdateLimitAmountZero()
{
$budgetLimit= FactoryMuffin::create('FireflyIII\Models\BudgetLimit');
$result = $this->object->updateLimitAmount($budgetLimit->budget, $budgetLimit->startdate, 0);
$this->assertTrue($result instanceof BudgetLimit);
} }
} }

View File

@@ -1,5 +1,8 @@
<?php <?php
use Carbon\Carbon;
use FireflyIII\Models\Category;
use FireflyIII\Repositories\Category\CategoryRepository; use FireflyIII\Repositories\Category\CategoryRepository;
use League\FactoryMuffin\Facade as FactoryMuffin;
/** /**
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:19:32. * Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:19:32.
@@ -32,14 +35,13 @@ class CategoryRepositoryTest extends TestCase
/** /**
* @covers FireflyIII\Repositories\Category\CategoryRepository::countJournals * @covers FireflyIII\Repositories\Category\CategoryRepository::countJournals
* @todo Implement testCountJournals().
*/ */
public function testCountJournals() public function testCountJournals()
{ {
// Remove the following lines when you implement this test. $category = FactoryMuffin::create('FireflyIII\Models\Category');
$this->markTestIncomplete( $result = $this->object->countJournals($category);
'This test has not been implemented yet.'
); $this->assertEquals(0, $result);
} }
/** /**
@@ -48,129 +50,204 @@ class CategoryRepositoryTest extends TestCase
*/ */
public function testDestroy() public function testDestroy()
{ {
// Remove the following lines when you implement this test. $category = FactoryMuffin::create('FireflyIII\Models\Category');
$this->markTestIncomplete( $this->object->destroy($category);
'This test has not been implemented yet.'
); $count = Category::where('id', $category->id)->whereNull('deleted_at')->count();
$this->assertEquals(0, $count);
} }
/** /**
* @covers FireflyIII\Repositories\Category\CategoryRepository::getCategories * @covers FireflyIII\Repositories\Category\CategoryRepository::getCategories
* @todo Implement testGetCategories().
*/ */
public function testGetCategories() public function testGetCategories()
{ {
// Remove the following lines when you implement this test. $user = FactoryMuffin::create('FireflyIII\User');
$this->markTestIncomplete( $cat1 = FactoryMuffin::create('FireflyIII\Models\Category');
'This test has not been implemented yet.' $cat2 = FactoryMuffin::create('FireflyIII\Models\Category');
); $cat1->name = 'BBBBB';
$cat2->name = 'AAAAA';
$cat1->user_id = $user->id;
$cat2->user_id = $user->id;
$cat1->save();
$cat2->save();
$this->be($user);
$set = $this->object->getCategories();
$this->assertEquals('AAAAA', $set->first()->name);
$this->assertCount(2, $set);
} }
/** /**
* @covers FireflyIII\Repositories\Category\CategoryRepository::getCategoriesAndExpenses * @covers FireflyIII\Repositories\Category\CategoryRepository::getCategoriesAndExpenses
* @todo Implement testGetCategoriesAndExpenses().
*/ */
public function testGetCategoriesAndExpenses() public function testGetCategoriesAndExpenses()
{ {
// Remove the following lines when you implement this test. $user = FactoryMuffin::create('FireflyIII\User');
$this->markTestIncomplete( $type = FactoryMuffin::create('FireflyIII\Models\TransactionType');
'This test has not been implemented yet.' // some journals and categories:
); for ($i = 0; $i < 5; $i++) {
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
/** @var Category $category */
$category = FactoryMuffin::create('FireflyIII\Models\Category');
$journal->user_id = $user->id;
$journal->date = new Carbon('2015-02-11');
$journal->transaction_type_id = $type->id;
$category->user_id = $user->id;
$category->transactionjournals()->save($journal);
$journal->save();
$category->save();
}
$this->be($user);
$set = $this->object->getCategoriesAndExpenses(new Carbon('2015-02-01'), new Carbon('2015-02-28'));
$this->assertCount(5, $set);
$this->assertEquals(0, $set->first()->sum);
} }
/** /**
* @covers FireflyIII\Repositories\Category\CategoryRepository::getFirstActivityDate * @covers FireflyIII\Repositories\Category\CategoryRepository::getFirstActivityDate
* @todo Implement testGetFirstActivityDate().
*/ */
public function testGetFirstActivityDate() public function testGetFirstActivityDate()
{ {
// Remove the following lines when you implement this test. $user = FactoryMuffin::create('FireflyIII\User');
$this->markTestIncomplete( $journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
'This test has not been implemented yet.' /** @var Category $category */
); $category = FactoryMuffin::create('FireflyIII\Models\Category');
$journal->user_id = $user->id;
$journal->date = new Carbon('2015-02-11');
$category->user_id = $user->id;
$category->transactionjournals()->save($journal);
$journal->save();
$category->save();
$this->be($user);
$date = $this->object->getFirstActivityDate($category);
$this->assertEquals('2015-02-11', $date->format('Y-m-d'));
}
/**
* @covers FireflyIII\Repositories\Category\CategoryRepository::getFirstActivityDate
*/
public function testGetFirstActivityDateNull()
{
/** @var Category $category */
$category = FactoryMuffin::create('FireflyIII\Models\Category');
$this->be($category->user);
$date = $this->object->getFirstActivityDate($category);
$this->assertEquals(Carbon::now()->format('Y-m-d'), $date->format('Y-m-d'));
} }
/** /**
* @covers FireflyIII\Repositories\Category\CategoryRepository::getJournals * @covers FireflyIII\Repositories\Category\CategoryRepository::getJournals
* @todo Implement testGetJournals().
*/ */
public function testGetJournals() public function testGetJournals()
{ {
// Remove the following lines when you implement this test.
$this->markTestIncomplete( /** @var Category $category */
'This test has not been implemented yet.' $category = FactoryMuffin::create('FireflyIII\Models\Category');
); $this->be($category->user);
$set = $this->object->getJournals($category, 1);
$this->assertEquals(0, $set->count());
} }
/** /**
* @covers FireflyIII\Repositories\Category\CategoryRepository::getLatestActivity * @covers FireflyIII\Repositories\Category\CategoryRepository::getLatestActivity
* @todo Implement testGetLatestActivity().
*/ */
public function testGetLatestActivity() public function testGetLatestActivity()
{ {
// Remove the following lines when you implement this test. $user = FactoryMuffin::create('FireflyIII\User');
$this->markTestIncomplete( $journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
'This test has not been implemented yet.' /** @var Category $category */
); $category = FactoryMuffin::create('FireflyIII\Models\Category');
$journal->user_id = $user->id;
$journal->date = new Carbon('2015-02-11');
$category->user_id = $user->id;
$category->transactionjournals()->save($journal);
$journal->save();
$category->save();
$this->be($user);
$date = $this->object->getLatestActivity($category);
$this->assertEquals('2015-02-11', $date->format('Y-m-d'));
} }
/** /**
* @covers FireflyIII\Repositories\Category\CategoryRepository::getWithoutCategory * @covers FireflyIII\Repositories\Category\CategoryRepository::getWithoutCategory
* @todo Implement testGetWithoutCategory().
*/ */
public function testGetWithoutCategory() public function testGetWithoutCategory()
{ {
// Remove the following lines when you implement this test. $user = FactoryMuffin::create('FireflyIII\User');
$this->markTestIncomplete( $this->be($user);
'This test has not been implemented yet.'
); $set = $this->object->getWithoutCategory(new Carbon, new Carbon);
$this->assertCount(0, $set);
} }
/** /**
* @covers FireflyIII\Repositories\Category\CategoryRepository::spentInPeriodSum * @covers FireflyIII\Repositories\Category\CategoryRepository::spentInPeriodSum
* @todo Implement testSpentInPeriodSum().
*/ */
public function testSpentInPeriodSum() public function testSpentInPeriodSum()
{ {
// Remove the following lines when you implement this test. $category = FactoryMuffin::create('FireflyIII\Models\Category');
$this->markTestIncomplete( $sum = $this->object->spentInPeriodSum($category, new Carbon, new Carbon);
'This test has not been implemented yet.'
); $this->assertEquals(0, $sum);
} }
/** /**
* @covers FireflyIII\Repositories\Category\CategoryRepository::spentOnDaySum * @covers FireflyIII\Repositories\Category\CategoryRepository::spentOnDaySum
* @todo Implement testSpentOnDaySum().
*/ */
public function testSpentOnDaySum() public function testSpentOnDaySum()
{ {
// Remove the following lines when you implement this test. $category = FactoryMuffin::create('FireflyIII\Models\Category');
$this->markTestIncomplete( $sum = $this->object->spentOnDaySum($category, new Carbon);
'This test has not been implemented yet.'
); $this->assertEquals(0, $sum);
} }
/** /**
* @covers FireflyIII\Repositories\Category\CategoryRepository::store * @covers FireflyIII\Repositories\Category\CategoryRepository::store
* @todo Implement testStore().
*/ */
public function testStore() public function testStore()
{ {
// Remove the following lines when you implement this test. $user = FactoryMuffin::create('FireflyIII\User');
$this->markTestIncomplete( $data = [
'This test has not been implemented yet.' 'name' => 'New category' . rand(1, 100),
); 'user' => $user->id
];
$newCategory = $this->object->store($data);
$this->assertEquals($data['name'], $newCategory->name);
} }
/** /**
* @covers FireflyIII\Repositories\Category\CategoryRepository::update * @covers FireflyIII\Repositories\Category\CategoryRepository::update
* @todo Implement testUpdate().
*/ */
public function testUpdate() public function testUpdate()
{ {
// Remove the following lines when you implement this test. $category = FactoryMuffin::create('FireflyIII\Models\Category');
$this->markTestIncomplete( $data = [
'This test has not been implemented yet.' 'name' => 'New category' . rand(1, 100),
); ];
$newCategory = $this->object->update($category, $data);
$this->assertEquals($data['name'], $newCategory->name);
}
public function testgetLatestActivityNull()
{
/** @var Category $category */
$category = FactoryMuffin::create('FireflyIII\Models\Category');
$this->be($category->user);
$date = $this->object->getLatestActivity($category);
$this->assertNull($date);
} }
} }

View File

@@ -1,5 +1,6 @@
<?php <?php
use FireflyIII\Repositories\Currency\CurrencyRepository; use FireflyIII\Repositories\Currency\CurrencyRepository;
use League\FactoryMuffin\Facade as FactoryMuffin;
/** /**
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:19:32. * Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:19:32.
@@ -32,61 +33,82 @@ class CurrencyRepositoryTest extends TestCase
/** /**
* @covers FireflyIII\Repositories\Currency\CurrencyRepository::countJournals * @covers FireflyIII\Repositories\Currency\CurrencyRepository::countJournals
* @todo Implement testCountJournals().
*/ */
public function testCountJournals() public function testCountJournals()
{ {
// Remove the following lines when you implement this test. $currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
$this->markTestIncomplete( $count = $this->object->countJournals($currency);
'This test has not been implemented yet.' $this->assertEquals(0, $count);
);
} }
/** /**
* @covers FireflyIII\Repositories\Currency\CurrencyRepository::get * @covers FireflyIII\Repositories\Currency\CurrencyRepository::get
* @todo Implement testGet().
*/ */
public function testGet() public function testGet()
{ {
// Remove the following lines when you implement this test. FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
$this->markTestIncomplete( FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
'This test has not been implemented yet.'
); $set = $this->object->get();
$this->assertCount(2, $set);
} }
/** /**
* @covers FireflyIII\Repositories\Currency\CurrencyRepository::getCurrencyByPreference * @covers FireflyIII\Repositories\Currency\CurrencyRepository::getCurrencyByPreference
* @todo Implement testGetCurrencyByPreference().
*/ */
public function testGetCurrencyByPreference() public function testGetCurrencyByPreference()
{ {
// Remove the following lines when you implement this test. $currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
$this->markTestIncomplete( $preference = FactoryMuffin::create('FireflyIII\Models\Preference');
'This test has not been implemented yet.' $preference->data = $currency->code;
); $preference->save();
$found = $this->object->getCurrencyByPreference($preference);
$this->assertEquals($currency->id, $found->id);
}
/**
* @covers FireflyIII\Repositories\Currency\CurrencyRepository::getCurrencyByPreference
*/
public function testGetCurrencyByPreferenceNull()
{
$first = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
$preference = FactoryMuffin::create('FireflyIII\Models\Preference');
$preference->data = 'ABC';
$preference->save();
$found = $this->object->getCurrencyByPreference($preference);
$this->assertEquals($first->id, $found->id);
} }
/** /**
* @covers FireflyIII\Repositories\Currency\CurrencyRepository::store * @covers FireflyIII\Repositories\Currency\CurrencyRepository::store
* @todo Implement testStore().
*/ */
public function testStore() public function testStore()
{ {
// Remove the following lines when you implement this test. $data = [
$this->markTestIncomplete( 'name' => 'Some Currency',
'This test has not been implemented yet.' 'code' => 'ABC',
); 'symbol' => 'S'
];
$currency = $this->object->store($data);
$this->assertEquals($data['name'], $currency->name);
} }
/** /**
* @covers FireflyIII\Repositories\Currency\CurrencyRepository::update * @covers FireflyIII\Repositories\Currency\CurrencyRepository::update
* @todo Implement testUpdate().
*/ */
public function testUpdate() public function testUpdate()
{ {
// Remove the following lines when you implement this test. $currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
$this->markTestIncomplete(
'This test has not been implemented yet.' $data = [
); 'name' => 'Some Currency',
'code' => 'ABC',
'symbol' => 'S'
];
$newCurrency = $this->object->update($currency, $data);
$this->assertEquals($data['name'], $newCurrency->name);
$this->assertEquals($currency->id, $newCurrency->id);
} }
} }