mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fixed the tests.
This commit is contained in:
parent
1bf0968bfe
commit
4113c4ff40
@ -24,7 +24,7 @@
|
||||
</td>
|
||||
<td>
|
||||
{% if budgetLine.getRepetition %}
|
||||
{{ budgetLine.getRepetition.startdate.formatLocalized(monthAndDayFormat) }}
|
||||
<a href="{{ route('budgets.show', [budgetLine.getBudget.id, budgetLine.getRepetition.id]) }}">{{ budgetLine.getRepetition.startdate.formatLocalized(monthAndDayFormat) }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
|
@ -150,7 +150,7 @@ class BudgetControllerTest extends TestCase
|
||||
Preferences::shouldReceive('set')->once()->withArgs(['budgetIncomeTotal' . $date, 1001]);
|
||||
|
||||
// language preference:
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language->data = 'en';
|
||||
$language->save();
|
||||
Preferences::shouldReceive('get')->withAnyArgs()->andReturn($language);
|
||||
@ -321,7 +321,7 @@ class BudgetControllerTest extends TestCase
|
||||
Amount::shouldReceive('getCurrencySymbol')->andReturn('X');
|
||||
|
||||
// language preference:
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language->data = 'en';
|
||||
$language->save();
|
||||
Preferences::shouldReceive('get')->withAnyArgs()->andReturn($language);
|
||||
|
@ -103,7 +103,7 @@ class HomeControllerTest extends TestCase
|
||||
$repository->shouldReceive('getFrontpageTransactions')->once()->andReturn($journals);
|
||||
|
||||
// language preference:
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language->data = 'en';
|
||||
$language->save();
|
||||
Preferences::shouldReceive('get')->withAnyArgs()->andReturn($language);
|
||||
|
@ -69,7 +69,7 @@ class JsonControllerTest extends TestCase
|
||||
public function testBoxBillsUnpaid()
|
||||
{
|
||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||
$creditCard = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
$creditCard = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
$ccs = new Collection([$creditCard]);
|
||||
$collection = new Collection([$bill]);
|
||||
$ranges = [['start' => new Carbon, 'end' => new Carbon]];
|
||||
|
@ -60,7 +60,7 @@ class PreferencesControllerTest extends TestCase
|
||||
Amount::shouldReceive('getDefaultCurrency')->andReturn($currency);
|
||||
|
||||
// language preference:
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language->data = 'en';
|
||||
$language->save();
|
||||
Preferences::shouldReceive('get')->withAnyArgs()->andReturn($language);
|
||||
@ -78,11 +78,11 @@ class PreferencesControllerTest extends TestCase
|
||||
'frontPageAccounts' => [1, 2, 3],
|
||||
'_token' => 'replaceMe',
|
||||
'viewRange' => '1M',
|
||||
'language' => 'en',
|
||||
'language' => 'en',
|
||||
];
|
||||
|
||||
// language preference:
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language->data = 'en';
|
||||
$language->save();
|
||||
Preferences::shouldReceive('get')->withAnyArgs()->andReturn($language);
|
||||
@ -93,7 +93,7 @@ class PreferencesControllerTest extends TestCase
|
||||
Preferences::shouldReceive('set')->once()->withArgs(['language', 'en']);
|
||||
|
||||
// language preference:
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language->data = 'en';
|
||||
$language->save();
|
||||
Preferences::shouldReceive('get')->withAnyArgs()->andReturn($language);
|
||||
|
@ -68,7 +68,7 @@ class ReportControllerTest extends TestCase
|
||||
|
||||
public function testMonth()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
$budget1 = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||
$budget1->queryAmount = 12;
|
||||
@ -86,6 +86,7 @@ class ReportControllerTest extends TestCase
|
||||
$helper->shouldReceive('getBudgetReport')->andReturn(new Collection);
|
||||
$helper->shouldReceive('getCategoryReport')->andReturn(new Collection);
|
||||
$helper->shouldReceive('getBalanceReport')->andReturn(new Collection);
|
||||
$helper->shouldReceive('getBillReport')->andReturn(new Collection);
|
||||
|
||||
|
||||
$this->call('GET', '/reports/2015/1');
|
||||
@ -94,7 +95,7 @@ class ReportControllerTest extends TestCase
|
||||
|
||||
public function testMonthShared()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
$budget1 = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||
$budget1->queryAmount = 12;
|
||||
@ -112,6 +113,7 @@ class ReportControllerTest extends TestCase
|
||||
$helper->shouldReceive('getBudgetReport')->andReturn(new Collection);
|
||||
$helper->shouldReceive('getCategoryReport')->andReturn(new Collection);
|
||||
$helper->shouldReceive('getBalanceReport')->andReturn(new Collection);
|
||||
$helper->shouldReceive('getBillReport')->andReturn(new Collection);
|
||||
|
||||
$this->call('GET', '/reports/2015/1/shared');
|
||||
$this->assertResponseOk();
|
||||
|
40
tests/controllers/charts/ChartAccountControllerTest.php
Normal file
40
tests/controllers/charts/ChartAccountControllerTest.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class ChartAccountControllerTest
|
||||
*/
|
||||
class ChartAccountControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testAll()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
public function testFrontpage()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
public function testSingle()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
}
|
37
tests/controllers/charts/ChartBillControllerTest.php
Normal file
37
tests/controllers/charts/ChartBillControllerTest.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class ChartBillControllerTest
|
||||
*/
|
||||
class ChartBillControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testFrontpage()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
public function testSingle()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
|
||||
}
|
41
tests/controllers/charts/ChartBudgetControllerTest.php
Normal file
41
tests/controllers/charts/ChartBudgetControllerTest.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class ChartBudgetControllerTest
|
||||
*/
|
||||
class ChartBudgetControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testBudget()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
public function testFrontpage()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
public function testYear()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
}
|
46
tests/controllers/charts/ChartCategoryControllerTest.php
Normal file
46
tests/controllers/charts/ChartCategoryControllerTest.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class ChartCategoryControllerTest
|
||||
*/
|
||||
class ChartCategoryControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testAll()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
public function testFrontpage()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
public function testMonth()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
public function testYear()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
}
|
30
tests/controllers/charts/ChartPiggyBankControllerTest.php
Normal file
30
tests/controllers/charts/ChartPiggyBankControllerTest.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class ChartPiggyBankControllerTest
|
||||
*/
|
||||
class ChartPiggyBankControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testHistory()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
}
|
35
tests/controllers/charts/ChartReportControllerTest.php
Normal file
35
tests/controllers/charts/ChartReportControllerTest.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class ChartReportControllerTest
|
||||
*/
|
||||
class ChartReportControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testYearInOut()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
public function testYearInOutSummarized()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user