23 lines
1004 B
PHP
23 lines
1004 B
PHP
<?php
|
||
|
||
declare(strict_types=1);
|
||
|
||
use App\Services\MonthlyPartitionManager;
|
||
|
||
// Unit test: verifies PARTITIONED_TABLES constant only — no DB.
|
||
// Added for TDD: project_routing_snapshots (snapshot_date key, Этап 2, 27.05.2026).
|
||
|
||
test('PARTITIONED_TABLES содержит project_routing_snapshots с ключом snapshot_date', function (): void {
|
||
expect(MonthlyPartitionManager::PARTITIONED_TABLES)
|
||
->toHaveKey('project_routing_snapshots')
|
||
->and(MonthlyPartitionManager::PARTITIONED_TABLES['project_routing_snapshots'])
|
||
->toBe('snapshot_date');
|
||
});
|
||
|
||
// Task 0.5 (imitation harness): verify that MonthlyPartitionManager::DDL_CONNECTION constant
|
||
// stays 'pgsql_supplier' (guard against accidental change when adding parent-exists check).
|
||
// Part of TDD sequence for migrate:fresh resilience fix.
|
||
test('DDL_CONNECTION константа остаётся pgsql_supplier', function (): void {
|
||
expect(MonthlyPartitionManager::DDL_CONNECTION)->toBe('pgsql_supplier');
|
||
});
|