Test: schema version assertion is a minimum, not an exact value
Test and Release / test (push) Successful in 1m14s
Test and Release / release (push) Successful in 4s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-11-15 12:50:35 -08:00
1 parent da1365f060
commit 1c6d93ad5f
1 file changed
+2 -1
+2 -1
View File
@@ -67,7 +67,8 @@ final class ActionRepositoryTest extends TestCase {
public function test_installer_schema_defines_both_tables_and_unique_key(): void {
$src = (string) file_get_contents( dirname( __DIR__, 2 ) . '/includes/Core/Installer.php' );
$this->assertStringContainsString( "DB_VERSION = '2'", $src );
$this->assertSame( 1, preg_match( "/DB_VERSION = '(\\d+)'/", $src, $m ), 'DB_VERSION constant not found' );
$this->assertGreaterThanOrEqual( 2, (int) $m[1], 'the actions tables arrived in schema version 2; later versions must keep them' );
$this->assertStringContainsString( 'CREATE TABLE {$p}actions (', $src );
$this->assertStringContainsString( 'CREATE TABLE {$p}action_events (', $src );
$this->assertStringContainsString( 'UNIQUE KEY donation_action (donation_id,action_id)', $src );