Initialer Laravel Commit für BetiX
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled
tests / ci (8.5) (push) Has been cancelled

This commit is contained in:
2026-04-04 18:01:50 +02:00
commit 0280278978
374 changed files with 65210 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature\Gateway;
use App\Models\User;
use Illuminate\Support\Facades\Http;
use Tests\TestCase;
class WalletControllerTest extends TestCase
{
private function base(): string { return rtrim((string) config('services.backend.base'), '/'); }
private function actingUser()
{
if (class_exists(User::class) && method_exists(User::class, 'factory')) {
return User::factory()->make(['id' => 901, 'username' => 'walletuser']);
}
return new class { public $id=901; public $username='walletuser'; public $role='User'; };
}
public function test_index_renders_with_upstream_data()
{
Http::fake([
$this->base() . '/wallet' => Http::response([
'wallets' => [ ['code' => 'USD', 'balance' => 10] ],
'btxBalance' => 10,
], 200),
]);
$res = $this->actingAs($this->actingUser())->get('/wallet');
$res->assertStatus(200);
}
}