Files
headroom/backend/tests/Unit/Models/ProjectForecastTest.php
Santhosh Janardhanan 8f70e81d29 test(project): Add Phase 1 pending tests for Project Lifecycle
Capability 3: Project Lifecycle Management - Phase 1 (RED)

E2E Tests (12 test.fixme):
- Create project with unique code
- Reject duplicate project code
- Valid/invalid status transitions
- Estimate approved requires estimate > 0
- Workflow progression
- Estimate rework path
- Project on hold
- Cancelled project
- Set approved estimate
- Update forecasted effort
- Validate forecasted effort

API Tests (9 markTestIncomplete):
- POST /api/projects
- Project code uniqueness
- Status transition validation
- Estimate/forecast endpoints

Unit Tests (3 markTestIncomplete):
- Project status state machine
- ProjectPolicy authorization
- Forecasted effort validation

All 173 tests passing (31 backend, 32 frontend, 110 E2E)
2026-02-18 23:50:48 -05:00

30 lines
769 B
PHP

<?php
namespace Tests\Unit\Models;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
use App\Models\Project;
use App\Models\ProjectStatus;
class ProjectForecastTest extends TestCase
{
use RefreshDatabase;
// 3.1.24 Unit test: Forecasted effort validation
public function test_forecasted_effort_validation()
{
$this->markTestIncomplete('3.1.24: Implement forecasted effort validation tests');
}
public function test_forecasted_sum_must_equal_approved_estimate()
{
$this->markTestIncomplete('3.1.24: Test forecasted sum equals approved');
}
public function test_forecasted_effort_tolerance()
{
$this->markTestIncomplete('3.1.24: Test 5% tolerance for forecasted effort');
}
}