mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-03 20:56:21 +00:00
Unskipped some tests.
This commit is contained in:
@@ -6,6 +6,9 @@
|
|||||||
* This software may be modified and distributed under the terms
|
* This software may be modified and distributed under the terms
|
||||||
* of the MIT license. See the LICENSE file for details.
|
* 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.
|
* Generated by PHPUnit_SkeletonGenerator on 2016-01-19 at 15:39:57.
|
||||||
@@ -18,10 +21,17 @@ class ChartBudgetControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testBudget()
|
public function testBudget()
|
||||||
{
|
{
|
||||||
// $this->be($this->user());
|
|
||||||
// $response = $this->call('GET', '/chart/budget/1');
|
$repository = Mockery::mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
|
||||||
// $this->assertEquals(200, $response->status());
|
$repository->shouldReceive('getExpensesPerMonth')->once()->andReturn(new Collection([new Budget]));
|
||||||
$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');
|
$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()
|
public function testMultiYear()
|
||||||
{
|
{
|
||||||
// $this->be($this->user());
|
|
||||||
// $response = $this->call('GET', '/chart/budget/multi-year/default/20150101/20160101/1/1');
|
$repository = Mockery::mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
|
||||||
// $this->assertEquals(200, $response->status());
|
$repository->shouldReceive('getBudgetedPerYear')->once()->andReturn(new Collection);
|
||||||
$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');
|
$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()
|
public function testYear()
|
||||||
{
|
{
|
||||||
// $this->be($this->user());
|
$repository = Mockery::mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
|
||||||
// $response = $this->call('GET', '/chart/budget/year/default/20150101/201512031/1');
|
$repository->shouldReceive('getBudgetsAndExpensesPerMonth')->once()->andReturn([]);
|
||||||
// $this->assertEquals(200, $response->status());
|
|
||||||
$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');
|
$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());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user