diff --git a/tests/Feature/CompanyGatewayResolutionTest.php b/tests/Feature/CompanyGatewayResolutionTest.php index 066fa4d4a118..da682ef38274 100644 --- a/tests/Feature/CompanyGatewayResolutionTest.php +++ b/tests/Feature/CompanyGatewayResolutionTest.php @@ -13,6 +13,7 @@ namespace Tests\Feature; use App\Models\Client; use App\Models\CompanyGateway; +use App\Models\Credit; use App\Models\GatewayType; use App\Utils\Traits\MakesHash; use Illuminate\Database\Eloquent\Model; @@ -128,11 +129,17 @@ class CompanyGatewayResolutionTest extends TestCase $this->client->country_id = 840; $this->client->save(); + Credit::query()->withTrashed()->cursor()->each(function ($c) { + $c->forceDelete(); + }); + $this->assertInstanceOf('\\stdClass', $this->cg->fees_and_limits); // $this->assertObjectHasAttribute('min_limit', $this->cg->fees_and_limits->{1}); $this->assertNotNull($this->cg->fees_and_limits->{1}->min_limit); $payment_methods = $this->client->service()->getPaymentMethods($amount); + nlog($payment_methods); + $this->assertEquals(2, count($payment_methods)); } @@ -143,6 +150,10 @@ class CompanyGatewayResolutionTest extends TestCase CompanyGateway::query()->withTrashed()->cursor()->each(function ($cg) { $cg->forceDelete(); }); + + Credit::query()->withTrashed()->cursor()->each(function ($c) { + $c->forceDelete(); + }); $data = []; $data[1]['min_limit'] = -1;