mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 07:08:19 +00:00
Disable all kinds of tests until upgrades are complete.
This commit is contained in:
@@ -22,7 +22,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Tests\Feature\Controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
|
||||
use FireflyIII\Helpers\Collector\TransactionCollectorInterface;
|
||||
use FireflyIII\Models\Bill;
|
||||
@@ -90,6 +89,7 @@ class BillControllerTest extends TestCase
|
||||
*/
|
||||
public function testDelete(): void
|
||||
{
|
||||
$bill = $this->user()->bills()->where('active', 1)->first();
|
||||
// mock stuff
|
||||
$attachHelper = $this->mock(AttachmentHelperInterface::class);
|
||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||
@@ -102,7 +102,7 @@ class BillControllerTest extends TestCase
|
||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('bills.delete', [1]));
|
||||
$response = $this->get(route('bills.delete', [$bill->id]));
|
||||
$response->assertStatus(200);
|
||||
// has bread crumb
|
||||
$response->assertSee('<ol class="breadcrumb">');
|
||||
@@ -231,6 +231,7 @@ class BillControllerTest extends TestCase
|
||||
*/
|
||||
public function testRescanInactive(): void
|
||||
{
|
||||
$bill = $this->user()->bills()->where('active', 0)->first();
|
||||
// mock stuff
|
||||
$attachHelper = $this->mock(AttachmentHelperInterface::class);
|
||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||
@@ -242,7 +243,7 @@ class BillControllerTest extends TestCase
|
||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('bills.rescan', [3]));
|
||||
$response = $this->get(route('bills.rescan', [$bill->id]));
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('warning');
|
||||
}
|
||||
@@ -252,6 +253,9 @@ class BillControllerTest extends TestCase
|
||||
*/
|
||||
public function testShow(): void
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
// mock stuff
|
||||
$attachHelper = $this->mock(AttachmentHelperInterface::class);
|
||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||
@@ -268,20 +272,20 @@ class BillControllerTest extends TestCase
|
||||
$transformer->shouldReceive('getAvailableIncludes')->atLeast()->once();
|
||||
$repository->shouldReceive('getAttachments')->atLeast()->once()->andReturn(new Collection);
|
||||
$transformer->shouldReceive('transform')->atLeast()->once()->andReturn(
|
||||
['id' => 5, 'active' => true, 'name' => 'x', 'next_expected_match' => '2018-01-01',
|
||||
'currency_symbol' => 'x','amount_min' => '10','amount_max' => '15'
|
||||
]
|
||||
['id' => 5, 'active' => true, 'name' => 'x', 'next_expected_match' => '2018-01-01',
|
||||
'currency_symbol' => 'x', 'amount_min' => '10', 'amount_max' => '15',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true)->atLeast()->once();
|
||||
$repository->shouldReceive('getYearAverage')->andReturn('0');
|
||||
$repository->shouldReceive('getOverallAverage')->andReturn('0');
|
||||
// $repository->shouldReceive('nextExpectedMatch')->andReturn(new Carbon);
|
||||
// $repository->shouldReceive('nextExpectedMatch')->andReturn(new Carbon);
|
||||
$repository->shouldReceive('getRulesForBill')->andReturn(new Collection);
|
||||
// $repository->shouldReceive('getNoteText')->andReturn('Hi there');
|
||||
// $repository->shouldReceive('getNoteText')->andReturn('Hi there');
|
||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||
//
|
||||
//
|
||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf();
|
||||
$collector->shouldReceive('setBills')->andReturnSelf();
|
||||
$collector->shouldReceive('setLimit')->andReturnSelf();
|
||||
@@ -289,8 +293,8 @@ class BillControllerTest extends TestCase
|
||||
$collector->shouldReceive('withBudgetInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('withCategoryInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('getPaginatedTransactions')->andReturn(new LengthAwarePaginator([], 0, 10));
|
||||
// $repository->shouldReceive('getPaidDatesInRange')->twice()->andReturn(new Collection([new Carbon, new Carbon, new Carbon]));
|
||||
// $repository->shouldReceive('setUser');
|
||||
// $repository->shouldReceive('getPaidDatesInRange')->twice()->andReturn(new Collection([new Carbon, new Carbon, new Carbon]));
|
||||
// $repository->shouldReceive('setUser');
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('bills.show', [1]));
|
||||
|
||||
Reference in New Issue
Block a user