mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Code cleanup.
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user