add projet
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Models;
|
||||
|
||||
use App\Models\PurchaseOrder;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class PurchaseOrderTest extends TestCase
|
||||
{
|
||||
public function test_model_metadata_is_converted(): void
|
||||
{
|
||||
$model = new PurchaseOrder();
|
||||
|
||||
$this->assertSame('purchase_orders', $model->getTable());
|
||||
$this->assertSame('id', $model->getKeyName());
|
||||
$this->assertSame(true, $model->timestamps);
|
||||
$this->assertSame(["po_number", "supplier_id", "status", "order_date", "expected_date", "subtotal", "tax", "total", "notes"], $model->getFillable());
|
||||
}
|
||||
|
||||
public function test_model_class_loads(): void
|
||||
{
|
||||
$this->assertInstanceOf(PurchaseOrder::class, new PurchaseOrder());
|
||||
$this->assertContains(SoftDeletes::class, class_uses_recursive(PurchaseOrder::class));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user