Code cleanup.

This commit is contained in:
James Cole
2017-11-22 21:12:27 +01:00
parent 4e6b782204
commit 781ca052d8
142 changed files with 213 additions and 859 deletions

View File

@@ -18,12 +18,10 @@
* 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\Chart;
use Carbon\Carbon;
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
@@ -43,14 +41,12 @@ use Tests\TestCase;
/**
* Class AccountControllerTest
*
* @package Tests\Feature\Controllers\Chart
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class AccountControllerTest extends TestCase
{
/**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::all
*/
@@ -85,7 +81,6 @@ class AccountControllerTest extends TestCase
$generator->shouldReceive('singleSet')->andReturn([]);
Steam::shouldReceive('balancesByAccounts')->twice()->andReturn([]);
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$response = $this->get(route('chart.account.expense'));
@@ -114,7 +109,6 @@ class AccountControllerTest extends TestCase
$generator->shouldReceive('pieChart')->andReturn([]);
$budgetRepos->shouldReceive('getBudgets')->andReturn(new Collection);
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$response = $this->get(route('chart.account.expense-budget', [1, '20120101', '20120131']));
@@ -145,7 +139,6 @@ class AccountControllerTest extends TestCase
$budgetRepos->shouldReceive('getBudgets')->andReturn(new Collection);
$accountRepos->shouldReceive('oldestJournalDate')->andReturn(Carbon::createFromTimestamp(time())->startOfMonth());
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$response = $this->get(route('chart.account.expense-budget-all', [1]));
@@ -374,5 +367,4 @@ class AccountControllerTest extends TestCase
$response = $this->get(route('chart.account.single', [1]));
$response->assertStatus(200);
}
}