mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
This fixes the broken tests.
This commit is contained in:
parent
5974bdcc2a
commit
bc67113d77
@ -607,7 +607,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function spentPerDay(Budget $budget, Carbon $start, Carbon $end)
|
||||
public function spentPerDay(Budget $budget, Carbon $start, Carbon $end): array
|
||||
{
|
||||
/** @var Collection $query */
|
||||
$query = $budget->transactionjournals()
|
||||
|
@ -221,7 +221,7 @@ interface BudgetRepositoryInterface
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function spentPerDay(Budget $budget, Carbon $start, Carbon $end);
|
||||
public function spentPerDay(Budget $budget, Carbon $start, Carbon $end): array;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
|
@ -161,6 +161,7 @@ return [
|
||||
|
||||
// own stuff:
|
||||
// Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
|
||||
// Barryvdh\Debugbar\ServiceProvider::class,
|
||||
'DaveJamesMiller\Breadcrumbs\ServiceProvider',
|
||||
'TwigBridge\ServiceProvider',
|
||||
|
||||
|
@ -88,7 +88,7 @@ class TestDataSeeder extends Seeder
|
||||
TestData::createBudgetLimit($user, $current, 'Bills', '1000');
|
||||
TestData::createBudgetLimit($user, $current, 'Car', '100');
|
||||
|
||||
echo 'Created test data for ' . $month . "\n";
|
||||
Log::info('Created test data for ' . $month);
|
||||
$current->addMonth();
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
* Class BasicTest
|
||||
*/
|
||||
|
||||
/** @noinspection PhpUndefinedClassInspection */
|
||||
class BasicTest extends TestCase
|
||||
{
|
||||
/**
|
||||
|
@ -7,7 +7,7 @@ use FireflyIII\User;
|
||||
* Class TestCase
|
||||
*/
|
||||
|
||||
/** @noinspection PhpUndefinedClassInspection */
|
||||
|
||||
class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
{
|
||||
/**
|
||||
|
@ -11,7 +11,6 @@
|
||||
* Generated by PHPUnit_SkeletonGenerator on 2016-01-19 at 15:40:28.
|
||||
*/
|
||||
|
||||
/** @noinspection PhpUndefinedClassInspection */
|
||||
class AuthControllerTest extends TestCase
|
||||
{
|
||||
|
||||
|
@ -24,7 +24,7 @@ class ChartBudgetControllerTest extends TestCase
|
||||
{
|
||||
|
||||
$repository = $this->mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
|
||||
$repository->shouldReceive('getExpensesPerMonth')->once()->andReturn(new Collection([new Budget]));
|
||||
$repository->shouldReceive('spentPerDay')->once()->andReturn([]);
|
||||
$repository->shouldReceive('getFirstBudgetLimitDate')->once()->andReturn(new Carbon);
|
||||
|
||||
$this->be($this->user());
|
||||
|
@ -8,7 +8,6 @@
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
/** @noinspection PhpUndefinedClassInspection */
|
||||
class HomeControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user