mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Compartmentalised all tests.
This commit is contained in:
parent
422f429725
commit
1ec11e3e2e
@ -47,6 +47,9 @@ class AccountControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function createAccount()
|
||||
{
|
||||
if (is_null($this->account)) {
|
||||
@ -54,6 +57,9 @@ class AccountControllerTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::create
|
||||
*/
|
||||
public function testCreate()
|
||||
{
|
||||
$pref = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
@ -79,6 +85,9 @@ class AccountControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::delete
|
||||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
|
||||
@ -89,6 +98,9 @@ class AccountControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::destroy
|
||||
*/
|
||||
public function testDestroy()
|
||||
{
|
||||
// fake an account.
|
||||
@ -106,6 +118,9 @@ class AccountControllerTest extends TestCase
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::edit
|
||||
*/
|
||||
public function testEdit()
|
||||
{
|
||||
// fake an account.
|
||||
@ -139,6 +154,9 @@ class AccountControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::index
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
// an account:
|
||||
@ -166,6 +184,9 @@ class AccountControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::show
|
||||
*/
|
||||
public function testShow()
|
||||
{
|
||||
// an account:
|
||||
@ -181,6 +202,9 @@ class AccountControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::store
|
||||
*/
|
||||
public function testStore()
|
||||
{
|
||||
// an account:
|
||||
@ -211,6 +235,9 @@ class AccountControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::store
|
||||
*/
|
||||
public function testStoreAndRedirect()
|
||||
{
|
||||
// an account:
|
||||
@ -242,6 +269,9 @@ class AccountControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::update
|
||||
*/
|
||||
public function testUpdate()
|
||||
{
|
||||
|
||||
@ -272,6 +302,9 @@ class AccountControllerTest extends TestCase
|
||||
$this->assertSessionHas('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::update
|
||||
*/
|
||||
public function testUpdateAndRedirect()
|
||||
{
|
||||
|
||||
|
@ -36,6 +36,9 @@ class AuthControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Auth\AuthController::postRegister
|
||||
*/
|
||||
public function testPostRegister()
|
||||
{
|
||||
|
||||
@ -50,6 +53,9 @@ class AuthControllerTest extends TestCase
|
||||
$this->assertSessionHas('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Auth\AuthController::postRegister
|
||||
*/
|
||||
public function testPostRegisterFails()
|
||||
{
|
||||
|
||||
|
@ -38,6 +38,9 @@ class BillControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::create
|
||||
*/
|
||||
public function testCreate()
|
||||
{
|
||||
// go!
|
||||
@ -56,6 +59,9 @@ class BillControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::delete
|
||||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
@ -65,6 +71,9 @@ class BillControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::destroy
|
||||
*/
|
||||
public function testDestroy()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
@ -79,6 +88,9 @@ class BillControllerTest extends TestCase
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::edit
|
||||
*/
|
||||
public function testEdit()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
@ -95,6 +107,9 @@ class BillControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::index
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
@ -116,6 +131,9 @@ class BillControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::rescan
|
||||
*/
|
||||
public function testRescan()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
@ -135,6 +153,9 @@ class BillControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::rescan
|
||||
*/
|
||||
public function testRescanInactive()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
@ -148,6 +169,9 @@ class BillControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::show
|
||||
*/
|
||||
public function testShow()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
@ -170,6 +194,9 @@ class BillControllerTest extends TestCase
|
||||
$this->call('GET', '/bills/show/' . $bill->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::store
|
||||
*/
|
||||
public function testStore()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
@ -185,6 +212,9 @@ class BillControllerTest extends TestCase
|
||||
$this->assertSessionHas('success', 'Bill "' . e($bill->name) . '" stored.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::store
|
||||
*/
|
||||
public function testStoreAndRedirect()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
@ -200,6 +230,9 @@ class BillControllerTest extends TestCase
|
||||
$this->assertSessionHas('success', 'Bill "' . e($bill->name) . '" stored.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::update
|
||||
*/
|
||||
public function testUpdate()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
@ -215,6 +248,9 @@ class BillControllerTest extends TestCase
|
||||
$this->assertSessionHas('success', 'Bill "' . e($bill->name) . '" updated.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::update
|
||||
*/
|
||||
public function testUpdateAndRedirect()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
|
@ -39,6 +39,9 @@ class BudgetControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::amount
|
||||
*/
|
||||
public function testAmount()
|
||||
{
|
||||
$repository = $this->mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
|
||||
@ -54,6 +57,9 @@ class BudgetControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::create
|
||||
*/
|
||||
public function testCreate()
|
||||
{
|
||||
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||
@ -63,6 +69,9 @@ class BudgetControllerTest extends TestCase
|
||||
$this->assertViewHas('subTitle', 'Create a new budget');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::delete
|
||||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||
@ -75,6 +84,9 @@ class BudgetControllerTest extends TestCase
|
||||
$this->assertSessionHas('budgets.delete.url');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::destroy
|
||||
*/
|
||||
public function testDestroy()
|
||||
{
|
||||
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||
@ -89,6 +101,9 @@ class BudgetControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::edit
|
||||
*/
|
||||
public function testEdit()
|
||||
{
|
||||
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||
@ -102,6 +117,9 @@ class BudgetControllerTest extends TestCase
|
||||
$this->assertSessionHas('budgets.edit.url');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::index
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||
@ -127,6 +145,9 @@ class BudgetControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::noBudget
|
||||
*/
|
||||
public function testNoBudget()
|
||||
{
|
||||
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||
@ -140,6 +161,9 @@ class BudgetControllerTest extends TestCase
|
||||
$this->assertViewHas('subTitle');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::postUpdateIncome
|
||||
*/
|
||||
public function testPostUpdateIncome()
|
||||
{
|
||||
|
||||
@ -160,6 +184,9 @@ class BudgetControllerTest extends TestCase
|
||||
$this->assertRedirectedToRoute('budgets.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::show
|
||||
*/
|
||||
public function testShow()
|
||||
{
|
||||
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||
@ -179,6 +206,9 @@ class BudgetControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::show
|
||||
*/
|
||||
public function testShowInvalidRepetition()
|
||||
{
|
||||
|
||||
@ -203,6 +233,9 @@ class BudgetControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::store
|
||||
*/
|
||||
public function testStore()
|
||||
{
|
||||
// a budget:
|
||||
@ -228,6 +261,9 @@ class BudgetControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::store
|
||||
*/
|
||||
public function testStoreAndRedirect()
|
||||
{
|
||||
// a budget:
|
||||
@ -254,6 +290,9 @@ class BudgetControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::update
|
||||
*/
|
||||
public function testUpdate()
|
||||
{
|
||||
|
||||
@ -280,6 +319,9 @@ class BudgetControllerTest extends TestCase
|
||||
$this->assertSessionHas('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::update
|
||||
*/
|
||||
public function testUpdateAndRedirect()
|
||||
{
|
||||
|
||||
@ -307,6 +349,9 @@ class BudgetControllerTest extends TestCase
|
||||
$this->assertSessionHas('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::updateIncome
|
||||
*/
|
||||
public function testUpdateIncome()
|
||||
{
|
||||
|
||||
|
@ -40,6 +40,9 @@ class CategoryControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::create
|
||||
*/
|
||||
public function testCreate()
|
||||
{
|
||||
$category = FactoryMuffin::create('FireflyIII\Models\Category');
|
||||
@ -50,6 +53,9 @@ class CategoryControllerTest extends TestCase
|
||||
$this->assertViewHas('subTitle', 'Create a new category');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::delete
|
||||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
|
||||
@ -61,6 +67,9 @@ class CategoryControllerTest extends TestCase
|
||||
$this->assertViewHas('subTitle', 'Delete category "' . e($category->name) . '"');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::destroy
|
||||
*/
|
||||
public function testDestroy()
|
||||
{
|
||||
$category = FactoryMuffin::create('FireflyIII\Models\Category');
|
||||
@ -74,6 +83,9 @@ class CategoryControllerTest extends TestCase
|
||||
$this->assertSessionHas('success', 'The category "' . e($category->name) . '" was deleted.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::edit
|
||||
*/
|
||||
public function testEdit()
|
||||
{
|
||||
$category = FactoryMuffin::create('FireflyIII\Models\Category');
|
||||
@ -84,6 +96,9 @@ class CategoryControllerTest extends TestCase
|
||||
$this->assertViewHas('subTitle', 'Edit category "' . e($category->name) . '"');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::index
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$collection = new Collection;
|
||||
@ -102,6 +117,9 @@ class CategoryControllerTest extends TestCase
|
||||
$this->assertViewHas('categories');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::noCategory
|
||||
*/
|
||||
public function testNoCategory()
|
||||
{
|
||||
$collection = new Collection;
|
||||
@ -123,6 +141,9 @@ class CategoryControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::show
|
||||
*/
|
||||
public function testShow()
|
||||
{
|
||||
$category = FactoryMuffin::create('FireflyIII\Models\Category');
|
||||
@ -146,6 +167,9 @@ class CategoryControllerTest extends TestCase
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::store
|
||||
*/
|
||||
public function testStore()
|
||||
{
|
||||
// create
|
||||
@ -165,7 +189,9 @@ class CategoryControllerTest extends TestCase
|
||||
$this->assertSessionHas('success', 'New category "' . $category->name . '" stored!');
|
||||
}
|
||||
|
||||
//
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::store
|
||||
*/
|
||||
public function testStoreAndRedirect()
|
||||
{
|
||||
// create
|
||||
@ -186,6 +212,9 @@ class CategoryControllerTest extends TestCase
|
||||
$this->assertSessionHas('success', 'New category "' . $category->name . '" stored!');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::update
|
||||
*/
|
||||
public function testUpdate()
|
||||
{
|
||||
// create
|
||||
@ -205,6 +234,9 @@ class CategoryControllerTest extends TestCase
|
||||
$this->assertSessionHas('success', 'Category "' . $category->name . '" updated.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::update
|
||||
*/
|
||||
public function testUpdateAndRedirect()
|
||||
{
|
||||
// create
|
||||
|
@ -37,6 +37,9 @@ class CurrencyControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::create
|
||||
*/
|
||||
public function testCreate()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -49,6 +52,9 @@ class CurrencyControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::defaultCurrency
|
||||
*/
|
||||
public function testDefaultCurrency()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -60,6 +66,9 @@ class CurrencyControllerTest extends TestCase
|
||||
$this->assertSessionHas('success', $currency->name . ' is now the default currency.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::delete
|
||||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -75,6 +84,9 @@ class CurrencyControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::delete
|
||||
*/
|
||||
public function testDeleteUnable()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -90,6 +102,9 @@ class CurrencyControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::destroy
|
||||
*/
|
||||
public function testDestroy()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -105,6 +120,9 @@ class CurrencyControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::destroy
|
||||
*/
|
||||
public function testDestroyUnable()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -120,6 +138,9 @@ class CurrencyControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::edit
|
||||
*/
|
||||
public function testEdit()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -134,6 +155,9 @@ class CurrencyControllerTest extends TestCase
|
||||
$this->assertViewHas('currency');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::index
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -148,6 +172,9 @@ class CurrencyControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::store
|
||||
*/
|
||||
public function testStore()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -166,6 +193,9 @@ class CurrencyControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::store
|
||||
*/
|
||||
public function testStoreAndReturn()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -184,6 +214,9 @@ class CurrencyControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::update
|
||||
*/
|
||||
public function testUpdate()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -200,6 +233,9 @@ class CurrencyControllerTest extends TestCase
|
||||
$this->assertSessionHas('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::update
|
||||
*/
|
||||
public function testUpdateAndReturn()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
|
@ -38,6 +38,7 @@ class HelpControllerTest extends TestCase
|
||||
|
||||
/**
|
||||
* Everything present and accounted for, and in cache:
|
||||
* @covers FireflyIII\Http\Controllers\HelpController::show
|
||||
*/
|
||||
public function testGetHelpText()
|
||||
{
|
||||
@ -58,6 +59,7 @@ class HelpControllerTest extends TestCase
|
||||
|
||||
/**
|
||||
* Everything present and accounted for, but not cached
|
||||
* @covers FireflyIII\Http\Controllers\HelpController::show
|
||||
*/
|
||||
public function testGetHelpTextNoCache()
|
||||
{
|
||||
@ -80,6 +82,7 @@ class HelpControllerTest extends TestCase
|
||||
|
||||
/**
|
||||
* No such route.
|
||||
* @covers FireflyIII\Http\Controllers\HelpController::show
|
||||
*/
|
||||
public function testGetHelpTextNoRoute()
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ class HomeControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers FireflyIII\Http\Controllers\HomeController::flush
|
||||
*/
|
||||
public function testFlush()
|
||||
{
|
||||
|
@ -37,6 +37,9 @@ class JsonControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::boxBillsPaid
|
||||
*/
|
||||
public function testBoxBillsPaid()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
@ -66,6 +69,9 @@ class JsonControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid
|
||||
*/
|
||||
public function testBoxBillsUnpaid()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
@ -92,6 +98,9 @@ class JsonControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::boxIn
|
||||
*/
|
||||
public function testBoxIn()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -106,6 +115,9 @@ class JsonControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::boxOut
|
||||
*/
|
||||
public function testBoxOut()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -120,6 +132,9 @@ class JsonControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::categories
|
||||
*/
|
||||
public function testCategories()
|
||||
{
|
||||
$category = FactoryMuffin::create('FireflyIII\Models\Category');
|
||||
@ -133,6 +148,9 @@ class JsonControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::expenseAccounts
|
||||
*/
|
||||
public function testExpenseAccounts()
|
||||
{
|
||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
@ -146,6 +164,9 @@ class JsonControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::revenueAccounts
|
||||
*/
|
||||
public function testRevenueAccounts()
|
||||
{
|
||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
@ -159,6 +180,9 @@ class JsonControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::tags
|
||||
*/
|
||||
public function testTags()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -177,6 +201,9 @@ class JsonControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::transactionJournals
|
||||
*/
|
||||
public function testTransactionJournals()
|
||||
{
|
||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||
|
@ -42,6 +42,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::add
|
||||
*/
|
||||
public function testAdd()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -60,6 +63,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::create
|
||||
*/
|
||||
public function testCreate()
|
||||
{
|
||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
@ -84,6 +90,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::delete
|
||||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -95,6 +104,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertViewHas('subTitle', 'Delete "' . e($piggyBank->name) . '"');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::destroy
|
||||
*/
|
||||
public function testDestroy()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -110,6 +122,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::edit
|
||||
*/
|
||||
public function testEdit()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -137,6 +152,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::edit
|
||||
*/
|
||||
public function testEditNullDate()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -164,6 +182,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::index
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$piggyBank1 = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -194,6 +215,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::order
|
||||
*/
|
||||
public function testOrder()
|
||||
{
|
||||
$piggyBank1 = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -214,6 +238,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::postAdd
|
||||
*/
|
||||
public function testPostAdd()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -232,6 +259,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::postAdd
|
||||
*/
|
||||
public function testPostAddOverdraw()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -250,6 +280,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::postRemove
|
||||
*/
|
||||
public function testPostRemove()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -286,7 +319,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::remove
|
||||
*/
|
||||
public function testRemove()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -300,6 +335,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::show
|
||||
*/
|
||||
public function testShow()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -316,6 +354,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::store
|
||||
*/
|
||||
public function testStore()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -338,6 +379,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::create
|
||||
*/
|
||||
public function testStoreCreateAnother()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -361,6 +405,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::update
|
||||
*/
|
||||
public function testUpdate()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -383,6 +430,9 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::update
|
||||
*/
|
||||
public function testUpdateReturnToEdit()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
|
@ -37,6 +37,9 @@ class PreferencesControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PreferencesController::index
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -69,6 +72,9 @@ class PreferencesControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PreferencesController::postIndex
|
||||
*/
|
||||
public function testPostIndex()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
|
@ -34,6 +34,9 @@ class ProfileControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ProfileController::changePassword
|
||||
*/
|
||||
public function testChangePassword()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -43,6 +46,9 @@ class ProfileControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ProfileController::deleteAccount
|
||||
*/
|
||||
public function testDeleteAccount()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -52,6 +58,9 @@ class ProfileControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ProfileController::index
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -61,6 +70,9 @@ class ProfileControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ProfileController::postChangePassword
|
||||
*/
|
||||
public function testPostChangePassword()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -83,6 +95,9 @@ class ProfileControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ProfileController::postChangePassword
|
||||
*/
|
||||
public function testPostChangePasswordInvalidCurrent()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -105,6 +120,9 @@ class ProfileControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ProfileController::postChangePassword
|
||||
*/
|
||||
public function testPostChangePasswordNoNewPassword()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -128,6 +146,9 @@ class ProfileControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ProfileController::postDeleteAccount
|
||||
*/
|
||||
public function testPostDeleteAccount()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -147,6 +168,9 @@ class ProfileControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ProfileController::postDeleteAccount
|
||||
*/
|
||||
public function testPostDeleteAccountInvalidPassword()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
|
@ -36,6 +36,9 @@ class ReminderControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReminderController::act
|
||||
*/
|
||||
public function testAct()
|
||||
{
|
||||
$reminder = FactoryMuffin::create('FireflyIII\Models\Reminder');
|
||||
@ -47,6 +50,9 @@ class ReminderControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReminderController::dismiss
|
||||
*/
|
||||
public function testDismiss()
|
||||
{
|
||||
$reminder = FactoryMuffin::create('FireflyIII\Models\Reminder');
|
||||
@ -57,6 +63,9 @@ class ReminderControllerTest extends TestCase
|
||||
$this->assertRedirectedTo('/');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReminderController::index
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -75,6 +84,9 @@ class ReminderControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReminderController::show
|
||||
*/
|
||||
public function testShow()
|
||||
{
|
||||
$reminder = FactoryMuffin::create('FireflyIII\Models\Reminder');
|
||||
@ -86,6 +98,9 @@ class ReminderControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReminderController::show
|
||||
*/
|
||||
public function testShowDismissed()
|
||||
{
|
||||
$reminder = FactoryMuffin::create('FireflyIII\Models\Reminder');
|
||||
|
@ -37,6 +37,9 @@ class ReportControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::index
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -66,6 +69,9 @@ class ReportControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::month
|
||||
*/
|
||||
public function testMonth()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -93,6 +99,9 @@ class ReportControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::month
|
||||
*/
|
||||
public function testMonthShared()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -119,6 +128,9 @@ class ReportControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::year
|
||||
*/
|
||||
public function testYear()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
|
@ -36,6 +36,9 @@ class SearchControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\SearchController::search
|
||||
*/
|
||||
public function testSearch()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
|
@ -37,6 +37,9 @@ class TagControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::create
|
||||
*/
|
||||
public function testCreate()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -46,6 +49,9 @@ class TagControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::delete
|
||||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||
@ -55,6 +61,9 @@ class TagControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::destroy
|
||||
*/
|
||||
public function testDestroy()
|
||||
{
|
||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||
@ -66,6 +75,9 @@ class TagControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::edit
|
||||
*/
|
||||
public function testEdit()
|
||||
{
|
||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||
@ -75,6 +87,9 @@ class TagControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::edit
|
||||
*/
|
||||
public function testEditBalancingAct()
|
||||
{
|
||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||
@ -93,6 +108,9 @@ class TagControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::edit
|
||||
*/
|
||||
public function testEditThreeExpenses()
|
||||
{
|
||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||
@ -116,6 +134,9 @@ class TagControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::hideTagHelp
|
||||
*/
|
||||
public function testHideTagHelp()
|
||||
{
|
||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||
@ -125,6 +146,9 @@ class TagControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::index
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||
@ -134,6 +158,9 @@ class TagControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::edit
|
||||
*/
|
||||
public function testMultipleDeposits()
|
||||
{
|
||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||
@ -156,6 +183,9 @@ class TagControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::show
|
||||
*/
|
||||
public function testShow()
|
||||
{
|
||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||
@ -165,6 +195,9 @@ class TagControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::store
|
||||
*/
|
||||
public function testStore()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -179,6 +212,9 @@ class TagControllerTest extends TestCase
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::store
|
||||
*/
|
||||
public function testStoreWithLocation()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -214,6 +250,9 @@ class TagControllerTest extends TestCase
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TagController::update
|
||||
*/
|
||||
public function testUpdateWithLocation()
|
||||
{
|
||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||
|
@ -39,7 +39,9 @@ class TransactionControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::create
|
||||
*/
|
||||
public function testCreate()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -57,6 +59,9 @@ class TransactionControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::delete
|
||||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||
@ -66,6 +71,9 @@ class TransactionControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::destroy
|
||||
*/
|
||||
public function testDestroy()
|
||||
{
|
||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||
@ -84,6 +92,7 @@ class TransactionControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::edit
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
*/
|
||||
public function testEdit()
|
||||
@ -136,6 +145,9 @@ class TransactionControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::index
|
||||
*/
|
||||
public function testIndexRevenue()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -152,6 +164,9 @@ class TransactionControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::index
|
||||
*/
|
||||
public function testIndexTransfer()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -167,6 +182,9 @@ class TransactionControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::index
|
||||
*/
|
||||
public function testIndexWithdrawal()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -182,6 +200,9 @@ class TransactionControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::reorder
|
||||
*/
|
||||
public function testReorder()
|
||||
{
|
||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||
@ -203,6 +224,9 @@ class TransactionControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::show
|
||||
*/
|
||||
public function testShow()
|
||||
{
|
||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||
@ -231,8 +255,7 @@ class TransactionControllerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @covers FireflyIII\Models\Category::firstOrCreateEncrypted
|
||||
* @covers FireflyIII\Models\Tag::firstOrCreateEncrypted
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::store
|
||||
*/
|
||||
public function testStore()
|
||||
{
|
||||
@ -279,8 +302,7 @@ class TransactionControllerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @covers FireflyIII\Models\Category::firstOrCreateEncrypted
|
||||
* @covers FireflyIII\Models\Tag::firstOrCreateEncrypted
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::store
|
||||
*/
|
||||
public function testStoreTransfer()
|
||||
{
|
||||
@ -341,8 +363,7 @@ class TransactionControllerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @covers FireflyIII\Models\Category::firstOrCreateEncrypted
|
||||
* @covers FireflyIII\Models\Tag::firstOrCreateEncrypted
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::update
|
||||
*/
|
||||
public function testUpdate()
|
||||
{
|
||||
@ -391,8 +412,7 @@ class TransactionControllerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @covers FireflyIII\Models\Category::firstOrCreateEncrypted
|
||||
* @covers FireflyIII\Models\Tag::firstOrCreateEncrypted
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::update
|
||||
*/
|
||||
public function testUpdateWithRedirect()
|
||||
{
|
||||
|
@ -28,6 +28,9 @@ class ChartAccountControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\AccountController::all
|
||||
*/
|
||||
public function testAll()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -64,6 +67,9 @@ class ChartAccountControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\AccountController::all
|
||||
*/
|
||||
public function testAllShared()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -93,6 +99,9 @@ class ChartAccountControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\AccountController::frontpage
|
||||
*/
|
||||
public function testFrontpage()
|
||||
{
|
||||
$accounts = new Collection([FactoryMuffin::create('FireflyIII\Models\Account')]);
|
||||
@ -110,6 +119,9 @@ class ChartAccountControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\AccountController::single
|
||||
*/
|
||||
public function testSingle()
|
||||
{
|
||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
|
@ -30,6 +30,9 @@ class ChartBillControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\BillController::frontpage
|
||||
*/
|
||||
public function testFrontpage()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -63,6 +66,9 @@ class ChartBillControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\BillController::single
|
||||
*/
|
||||
public function testSingle()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
|
@ -27,6 +27,9 @@ class ChartBudgetControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\BudgetController::budget
|
||||
*/
|
||||
public function testBudget()
|
||||
{
|
||||
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||
@ -38,6 +41,9 @@ class ChartBudgetControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\BudgetController::budgetLimit
|
||||
*/
|
||||
public function testBudgetLimit()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -68,6 +74,9 @@ class ChartBudgetControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\BudgetController::frontpage
|
||||
*/
|
||||
public function testFrontpage()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -116,6 +125,9 @@ class ChartBudgetControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\BudgetController::year
|
||||
*/
|
||||
public function testYear()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -136,6 +148,9 @@ class ChartBudgetControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\BudgetController::year
|
||||
*/
|
||||
public function testYearShared()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
|
@ -26,6 +26,9 @@ class ChartCategoryControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\CategoryController::all
|
||||
*/
|
||||
public function testAll()
|
||||
{
|
||||
|
||||
@ -38,6 +41,9 @@ class ChartCategoryControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\CategoryController::frontpage
|
||||
*/
|
||||
public function testFrontpage()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -62,6 +68,9 @@ class ChartCategoryControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\CategoryController::month
|
||||
*/
|
||||
public function testMonth()
|
||||
{
|
||||
$category = FactoryMuffin::create('FireflyIII\Models\Category');
|
||||
@ -71,6 +80,9 @@ class ChartCategoryControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\CategoryController::year
|
||||
*/
|
||||
public function testYear()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -89,6 +101,9 @@ class ChartCategoryControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\CategoryController::year
|
||||
*/
|
||||
public function testYearShared()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
|
@ -25,6 +25,9 @@ class ChartPiggyBankControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\PiggyBankController::history
|
||||
*/
|
||||
public function testHistory()
|
||||
{
|
||||
$piggy = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
|
@ -25,6 +25,9 @@ class ChartReportControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\ReportController::yearInOut
|
||||
*/
|
||||
public function testYearInOut()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -35,6 +38,9 @@ class ChartReportControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\ReportController::yearInOut
|
||||
*/
|
||||
public function testYearInOutShared()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -45,6 +51,9 @@ class ChartReportControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\ReportController::yearInOutSummarized
|
||||
*/
|
||||
public function testYearInOutSummarized()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -54,6 +63,9 @@ class ChartReportControllerTest extends TestCase
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\Chart\ReportController::yearInOutSummarized
|
||||
*/
|
||||
public function testYearInOutSummarizedShared()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
|
@ -32,6 +32,7 @@ class ConnectJournalToPiggyBankTest extends TestCase
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @covers FireflyIII\Handlers\Events\ConnectJournalToPiggyBank::handle
|
||||
*/
|
||||
public function testNoRepetition()
|
||||
{
|
||||
@ -86,6 +87,9 @@ class ConnectJournalToPiggyBankTest extends TestCase
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Handlers\Events\ConnectJournalToPiggyBank::handle
|
||||
*/
|
||||
public function testNoSuchPiggy()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
@ -102,6 +106,7 @@ class ConnectJournalToPiggyBankTest extends TestCase
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @covers FireflyIII\Handlers\Events\ConnectJournalToPiggyBank::handle
|
||||
*/
|
||||
public function testWithRepetition()
|
||||
{
|
||||
@ -162,6 +167,7 @@ class ConnectJournalToPiggyBankTest extends TestCase
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @covers FireflyIII\Handlers\Events\ConnectJournalToPiggyBank::handle
|
||||
*/
|
||||
public function testWithRepetitionReversed()
|
||||
{
|
||||
|
@ -38,6 +38,9 @@ class ReminderHelperTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Reminders\ReminderHelper::createReminder
|
||||
*/
|
||||
public function testCreateReminder()
|
||||
{
|
||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
@ -52,6 +55,9 @@ class ReminderHelperTest extends TestCase
|
||||
$this->assertEquals($piggyBank->targetamount, $result->metadata->leftToSave);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Reminders\ReminderHelper::createReminder
|
||||
*/
|
||||
public function testCreateReminderHaveAlready()
|
||||
{
|
||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
@ -72,6 +78,9 @@ class ReminderHelperTest extends TestCase
|
||||
$this->assertEquals($reminder->id, $result->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Reminders\ReminderHelper::createReminder
|
||||
*/
|
||||
public function testCreateReminderNoTarget()
|
||||
{
|
||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
@ -88,7 +97,7 @@ class ReminderHelperTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers FireflyIII\Helpers\Reminders\ReminderHelper::createReminders
|
||||
*/
|
||||
public function testCreateReminders()
|
||||
{
|
||||
@ -108,6 +117,9 @@ class ReminderHelperTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Reminders\ReminderHelper::getReminderRanges
|
||||
*/
|
||||
public function testGetReminderRangesNull()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -115,6 +127,9 @@ class ReminderHelperTest extends TestCase
|
||||
$this->assertEquals([], $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Reminders\ReminderHelper::getReminderRanges
|
||||
*/
|
||||
public function testGetReminderRangesWithTargetDate()
|
||||
{
|
||||
/** @var \FireflyIII\Models\PiggyBank $piggyBank */
|
||||
@ -131,6 +146,9 @@ class ReminderHelperTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Reminders\ReminderHelper::getReminderRanges
|
||||
*/
|
||||
public function testGetReminderRangesWithoutTargetDate()
|
||||
{
|
||||
/** @var \FireflyIII\Models\PiggyBank $piggyBank */
|
||||
@ -146,6 +164,9 @@ class ReminderHelperTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Reminders\ReminderHelper::getReminderText
|
||||
*/
|
||||
public function testGetReminderTextDate()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
@ -161,6 +182,9 @@ class ReminderHelperTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Reminders\ReminderHelper::getReminderText
|
||||
*/
|
||||
public function testGetReminderTextNoPiggy()
|
||||
{
|
||||
$reminder = FactoryMuffin::create('FireflyIII\Models\Reminder');
|
||||
@ -169,6 +193,9 @@ class ReminderHelperTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Reminders\ReminderHelper::getReminderText
|
||||
*/
|
||||
public function testGetReminderTextNullDate()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
|
@ -42,7 +42,6 @@ class ReportHelperTest extends TestCase
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Report\ReportHelper::getAccountReport
|
||||
* @covers FireflyIII\Helpers\Report\ReportQuery::getAllAccounts
|
||||
*/
|
||||
public function testGetAccountReport()
|
||||
{
|
||||
@ -68,9 +67,6 @@ class ReportHelperTest extends TestCase
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Report\ReportHelper::getBalanceReport
|
||||
* @covers FireflyIII\Helpers\Report\ReportQuery::getAllAccounts
|
||||
* @covers FireflyIII\Helpers\Report\ReportQuery::spentInBudgetCorrected
|
||||
* @covers FireflyIII\Helpers\Report\ReportQuery::spentNoBudget
|
||||
*/
|
||||
public function testGetBalanceReport()
|
||||
{
|
||||
@ -218,7 +214,6 @@ class ReportHelperTest extends TestCase
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Report\ReportHelper::getExpenseReport
|
||||
* @covers FireflyIII\Helpers\Report\ReportQuery::expenseInPeriodCorrected
|
||||
*/
|
||||
public function testGetExpenseReport()
|
||||
{
|
||||
@ -279,7 +274,6 @@ class ReportHelperTest extends TestCase
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Helpers\Report\ReportHelper::getIncomeReport
|
||||
* @covers FireflyIII\Helpers\Report\ReportQuery::incomeInPeriodCorrected
|
||||
*/
|
||||
public function testGetIncomeReport()
|
||||
{
|
||||
|
@ -687,7 +687,6 @@ class AccountRepositoryTest extends TestCase
|
||||
* @covers FireflyIII\Repositories\Account\AccountRepository::storeAccount
|
||||
* @covers FireflyIII\Repositories\Account\AccountRepository::storeMetadata
|
||||
* @covers FireflyIII\Repositories\Account\AccountRepository::storeInitialBalance
|
||||
* @covers FireflyII\Models\Account::firstOrNullEncrypted
|
||||
* @expectedException Symfony\Component\HttpKernel\Exception\HttpException
|
||||
*/
|
||||
public function testStoreWithInvalidAccountData()
|
||||
|
Loading…
Reference in New Issue
Block a user