mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
Code cleanup.
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Feature\Controllers;
|
||||
@@ -38,7 +37,6 @@ use Tests\TestCase;
|
||||
/**
|
||||
* Class BudgetControllerTest
|
||||
*
|
||||
* @package Tests\Feature\Controllers
|
||||
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
|
||||
@@ -184,7 +182,6 @@ class BudgetControllerTest extends TestCase
|
||||
$repository->shouldReceive('collectBudgetInformation')->andReturn($budgetInfo);
|
||||
$repository->shouldReceive('getBudgetLimits')->andReturn(new Collection([$budgetLimit]));
|
||||
|
||||
|
||||
$this->be($this->user());
|
||||
$this->changeDateRange($this->user(), $range);
|
||||
$response = $this->get(route('budgets.index'));
|
||||
@@ -231,7 +228,6 @@ class BudgetControllerTest extends TestCase
|
||||
$repository->shouldReceive('getBudgetLimits')->andReturn(new Collection([$budgetLimit]));
|
||||
$repository->shouldReceive('collectBudgetInformation')->andReturn($budgetInfo);
|
||||
|
||||
|
||||
$this->be($this->user());
|
||||
$this->changeDateRange($this->user(), $range);
|
||||
$response = $this->get(route('budgets.index', ['2017-01-01']));
|
||||
@@ -278,7 +274,6 @@ class BudgetControllerTest extends TestCase
|
||||
$repository->shouldReceive('getBudgetLimits')->andReturn(new Collection([$budgetLimit]));
|
||||
$repository->shouldReceive('collectBudgetInformation')->andReturn($budgetInfo);
|
||||
|
||||
|
||||
$this->be($this->user());
|
||||
$this->changeDateRange($this->user(), $range);
|
||||
$response = $this->get(route('budgets.index', ['Hello-there']));
|
||||
@@ -455,7 +450,6 @@ class BudgetControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\BudgetController::showByBudgetLimit
|
||||
* @expectedExceptionMessage This budget limit is not part of
|
||||
*
|
||||
*/
|
||||
public function testShowByBadBudgetLimit()
|
||||
{
|
||||
@@ -484,7 +478,6 @@ class BudgetControllerTest extends TestCase
|
||||
$accountRepository = $this->mock(AccountRepositoryInterface::class);
|
||||
$accountRepository->shouldReceive('getAccountsByType')->andReturn(new Collection);
|
||||
|
||||
|
||||
// mock budget repository
|
||||
$budgetRepository = $this->mock(BudgetRepositoryInterface::class);
|
||||
$budgetRepository->shouldReceive('spentInPeriod')->andReturn('1');
|
||||
@@ -500,7 +493,6 @@ class BudgetControllerTest extends TestCase
|
||||
$collector->shouldReceive('withBudgetInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));
|
||||
|
||||
|
||||
$this->be($this->user());
|
||||
$this->changeDateRange($this->user(), $range);
|
||||
$response = $this->get(route('budgets.show.limit', [1, 1]));
|
||||
@@ -575,5 +567,4 @@ class BudgetControllerTest extends TestCase
|
||||
$response = $this->get(route('budgets.income', ['2017-01-01', '2017-01-31']));
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user