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\Transaction;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Models\AccountType;
use FireflyIII\Models\Transaction;
@@ -40,7 +38,6 @@ use Tests\TestCase;
/**
* Class SplitControllerTest
*
* @package Tests\Feature\Controllers\Transaction
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -55,7 +52,6 @@ class SplitControllerTest extends TestCase
*/
public function testEdit()
{
$currencyRepository = $this->mock(CurrencyRepositoryInterface::class);
$accountRepository = $this->mock(AccountRepositoryInterface::class);
$budgetRepository = $this->mock(BudgetRepositoryInterface::class);
@@ -71,7 +67,6 @@ class SplitControllerTest extends TestCase
$budgetRepository->shouldReceive('getActiveBudgets')->andReturn(new Collection);
$tasker->shouldReceive('getTransactionsOverview')->andReturn($transactions->toArray());
$this->be($this->user());
$response = $this->get(route('transactions.split.edit', [$deposit->id]));
$response->assertStatus(200);
@@ -98,7 +93,6 @@ class SplitControllerTest extends TestCase
*/
public function testEditSingle()
{
$currencyRepository = $this->mock(CurrencyRepositoryInterface::class);
$accountRepository = $this->mock(AccountRepositoryInterface::class);
$budgetRepository = $this->mock(BudgetRepositoryInterface::class);
@@ -114,7 +108,6 @@ class SplitControllerTest extends TestCase
$budgetRepository->shouldReceive('getActiveBudgets')->andReturn(new Collection);
$tasker->shouldReceive('getTransactionsOverview')->andReturn($transactions->toArray());
$this->be($this->user());
$response = $this->get(route('transactions.split.edit', [$deposit->id]));
$response->assertStatus(200);
@@ -158,7 +151,6 @@ class SplitControllerTest extends TestCase
$repository->shouldReceive('updateSplitJournal')->andReturn($deposit);
$repository->shouldReceive('first')->times(2)->andReturn(new TransactionJournal);
$attachmentRepos = $this->mock(AttachmentHelperInterface::class);
$attachmentRepos->shouldReceive('saveAttachmentsForModel');
$attachmentRepos->shouldReceive('getMessages')->andReturn(new MessageBag);
@@ -191,5 +183,4 @@ class SplitControllerTest extends TestCase
$response->assertStatus(302);
$response->assertSessionMissing('success');
}
}