Unskipped some tests.

This commit is contained in:
James Cole 2016-01-22 23:00:32 +01:00
parent d672f0c2ad
commit 049d866f62

View File

@ -6,6 +6,9 @@
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
use Carbon\Carbon;
use FireflyIII\Models\Budget;
use Illuminate\Support\Collection;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-01-19 at 15:39:57.
@ -18,10 +21,17 @@ class ChartBudgetControllerTest extends TestCase
*/
public function testBudget()
{
// $this->be($this->user());
// $response = $this->call('GET', '/chart/budget/1');
// $this->assertEquals(200, $response->status());
$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');
$repository = Mockery::mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
$repository->shouldReceive('getExpensesPerMonth')->once()->andReturn(new Collection([new Budget]));
$repository->shouldReceive('getFirstBudgetLimitDate')->once()->andReturn(new Carbon);
$this->app->instance('FireflyIII\Repositories\Budget\BudgetRepositoryInterface', $repository);
$this->be($this->user());
$response = $this->call('GET', '/chart/budget/1');
$this->assertEquals(200, $response->status());
//$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');
}
/**
@ -51,10 +61,17 @@ class ChartBudgetControllerTest extends TestCase
*/
public function testMultiYear()
{
// $this->be($this->user());
// $response = $this->call('GET', '/chart/budget/multi-year/default/20150101/20160101/1/1');
// $this->assertEquals(200, $response->status());
$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');
$repository = Mockery::mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
$repository->shouldReceive('getBudgetedPerYear')->once()->andReturn(new Collection);
$repository->shouldReceive('getBudgetsAndExpensesPerYear')->once()->andReturn([]);
$this->app->instance('FireflyIII\Repositories\Budget\BudgetRepositoryInterface', $repository);
$this->be($this->user());
$response = $this->call('GET', '/chart/budget/multi-year/default/20150101/20160101/1/1');
$this->assertEquals(200, $response->status());
}
@ -63,10 +80,14 @@ class ChartBudgetControllerTest extends TestCase
*/
public function testYear()
{
// $this->be($this->user());
// $response = $this->call('GET', '/chart/budget/year/default/20150101/201512031/1');
// $this->assertEquals(200, $response->status());
$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');
$repository = Mockery::mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
$repository->shouldReceive('getBudgetsAndExpensesPerMonth')->once()->andReturn([]);
$this->app->instance('FireflyIII\Repositories\Budget\BudgetRepositoryInterface', $repository);
$this->be($this->user());
$response = $this->call('GET', '/chart/budget/year/default/20150101/20151231/1');
$this->assertEquals(200, $response->status());
}
}