This fixes the broken tests.

This commit is contained in:
James Cole 2016-02-10 12:01:45 +01:00
parent 5974bdcc2a
commit bc67113d77
9 changed files with 6 additions and 8 deletions

View File

@ -607,7 +607,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
* *
* @return array * @return array
*/ */
public function spentPerDay(Budget $budget, Carbon $start, Carbon $end) public function spentPerDay(Budget $budget, Carbon $start, Carbon $end): array
{ {
/** @var Collection $query */ /** @var Collection $query */
$query = $budget->transactionjournals() $query = $budget->transactionjournals()

View File

@ -221,7 +221,7 @@ interface BudgetRepositoryInterface
* *
* @return array * @return array
*/ */
public function spentPerDay(Budget $budget, Carbon $start, Carbon $end); public function spentPerDay(Budget $budget, Carbon $start, Carbon $end): array;
/** /**
* @param array $data * @param array $data

View File

@ -161,6 +161,7 @@ return [
// own stuff: // own stuff:
// Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, // Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
// Barryvdh\Debugbar\ServiceProvider::class,
'DaveJamesMiller\Breadcrumbs\ServiceProvider', 'DaveJamesMiller\Breadcrumbs\ServiceProvider',
'TwigBridge\ServiceProvider', 'TwigBridge\ServiceProvider',

View File

@ -88,7 +88,7 @@ class TestDataSeeder extends Seeder
TestData::createBudgetLimit($user, $current, 'Bills', '1000'); TestData::createBudgetLimit($user, $current, 'Bills', '1000');
TestData::createBudgetLimit($user, $current, 'Car', '100'); TestData::createBudgetLimit($user, $current, 'Car', '100');
echo 'Created test data for ' . $month . "\n"; Log::info('Created test data for ' . $month);
$current->addMonth(); $current->addMonth();
} }
} }

View File

@ -4,7 +4,6 @@
* Class BasicTest * Class BasicTest
*/ */
/** @noinspection PhpUndefinedClassInspection */
class BasicTest extends TestCase class BasicTest extends TestCase
{ {
/** /**

View File

@ -7,7 +7,7 @@ use FireflyIII\User;
* Class TestCase * Class TestCase
*/ */
/** @noinspection PhpUndefinedClassInspection */
class TestCase extends Illuminate\Foundation\Testing\TestCase class TestCase extends Illuminate\Foundation\Testing\TestCase
{ {
/** /**

View File

@ -11,7 +11,6 @@
* Generated by PHPUnit_SkeletonGenerator on 2016-01-19 at 15:40:28. * Generated by PHPUnit_SkeletonGenerator on 2016-01-19 at 15:40:28.
*/ */
/** @noinspection PhpUndefinedClassInspection */
class AuthControllerTest extends TestCase class AuthControllerTest extends TestCase
{ {

View File

@ -24,7 +24,7 @@ class ChartBudgetControllerTest extends TestCase
{ {
$repository = $this->mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface'); $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); $repository->shouldReceive('getFirstBudgetLimitDate')->once()->andReturn(new Carbon);
$this->be($this->user()); $this->be($this->user());

View File

@ -8,7 +8,6 @@
* of the MIT license. See the LICENSE file for details. * of the MIT license. See the LICENSE file for details.
*/ */
/** @noinspection PhpUndefinedClassInspection */
class HomeControllerTest extends TestCase class HomeControllerTest extends TestCase
{ {
/** /**