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\Models\Account;
@@ -37,14 +35,12 @@ use Tests\TestCase;
/**
* Class CategoryControllerTest
*
* @package Tests\Feature\Controllers\Chart
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class CategoryControllerTest extends TestCase
{
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::all
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::__construct
@@ -64,7 +60,6 @@ class CategoryControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsByType')->withArgs([[AccountType::DEFAULT, AccountType::ASSET]])->andReturn(new Collection)->once();
$generator->shouldReceive('multiSet')->once()->andReturn([]);
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$response = $this->get(route('chart.category.all', [1]));
@@ -109,7 +104,6 @@ class CategoryControllerTest extends TestCase
$repository->shouldReceive('periodIncome')->andReturn([])->once();
$generator->shouldReceive('multiSet')->andReturn([])->once();
$this->be($this->user());
$response = $this->get(route('chart.category.period', [1, '1', '20120101', '20120131']));
$response->assertStatus(200);
@@ -156,5 +150,4 @@ class CategoryControllerTest extends TestCase
$response = $this->get(route('chart.category.specific', ['1', '2012-01-01']));
$response->assertStatus(200);
}
}