Fixed the tests.

This commit is contained in:
James Cole 2015-05-18 17:57:44 +02:00
parent 1bf0968bfe
commit 4113c4ff40
12 changed files with 242 additions and 11 deletions

View File

@ -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>

View File

@ -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);

View File

@ -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);

View File

@ -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]];

View File

@ -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);

View File

@ -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();

View 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();
}
}

View 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();
}
}

View 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();
}
}

View 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();
}
}

View 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();
}
}

View 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();
}
}