GOOD SHELL MAS BOY
Server: Apache/2.4.52 (Ubuntu)
System: Linux vmi1836763.contaboserver.net 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64
User: www-data (33)
PHP: 8.4.10
Disabled: NONE
Upload Files
File: /var/www/api.ayokah.co.uk/tests/Unit/SellerTest.php
<?php

namespace Tests\Unit;

use App\Models\User;
use App\Models\Seller;
use Illuminate\Support\Str;
use PHPUnit\Framework\TestCase;
use Illuminate\Database\QueryException;
use Illuminate\Foundation\Testing\RefreshDatabase;

class SellerTest extends TestCase
{
    use RefreshDatabase;

    public function test_example(): void
    {
        $this->assertTrue(true);
    }
    public function a_seller_can_be_created()
    {
        // Create a user
        $user = User::factory()->create();

        // Data for the seller
        $sellerData = [
            'user_id' => $user->id,
            'address' => '123 Business St.',
            'business_name' => 'aTest Business',
            'slug' => Str::slug('Test Business'),
            'description' => 'This is a test business.',
            'registered_status' => 'registered',
            'reg_no' => '123456789',
            'type' => 'Retail',
            'plan_id' => 1,
            'category_id' => 1,
            'logo' => 'https://example.com/logo.png',
            'facebook' => 'https://facebook.com/testbusiness',
            'instagram' => 'https://instagram.com/testbusiness',
            'sort_code' => '123456',
            'account_no' => '12345678',
            'account_name' => 'Test Business Account',
            'bank_name' => 'Test Bank',
            'device_data' => 'Test Device Data',
            'location_data' => 'Test Location Data',
        ];

        // Create a seller
        $seller = Seller::create($sellerData);
        $this->assertInstanceOf(Seller::class, $seller);
        $this->assertTrue(true);

    } 
}