Files
portal/app/tests/Unit/Models/ProjectPausedAtTest.php
T

30 lines
788 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Unit\Models;
use App\Models\Project;
use Tests\TestCase;
/**
* Гарантирует, что колонка `paused_at` mass-assignable и cast'ится в datetime.
*
* Связано: SupplierSnapshotGuard (docs/superpowers/plans/2026-05-26-supplier-snapshot-guard.md).
*/
class ProjectPausedAtTest extends TestCase
{
public function test_paused_at_is_in_fillable(): void
{
$fillable = (new Project)->getFillable();
$this->assertContains('paused_at', $fillable);
}
public function test_paused_at_is_cast_to_datetime(): void
{
$casts = (new Project)->getCasts();
$this->assertArrayHasKey('paused_at', $casts);
$this->assertSame('datetime', $casts['paused_at']);
}
}