File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9178,6 +9178,9 @@ public function testAlterTableAddCheckConstraint(): void {
91789178 // Insert valid data.
91799179 $ this ->assertQuery ( 'INSERT INTO t (id) VALUES (1) ' );
91809180
9181+ $ result = $ this ->assertQuery ( 'SELECT * FROM t ' );
9182+ $ this ->assertCount ( 1 , $ result );
9183+
91819184 // Insert invalid data.
91829185 $ this ->expectException ( WP_SQLite_Driver_Exception::class );
91839186 $ this ->expectExceptionMessage ( 'SQLSTATE[23000]: Integrity constraint violation: 19 CHECK constraint failed: c ' );
@@ -9207,5 +9210,12 @@ public function testAlterTableDropCheckConstraint(): void {
92079210 ),
92089211 $ result [0 ]->{'Create Table ' }
92099212 );
9213+
9214+ // Insert data that would violate the constraints.
9215+ $ this ->assertQuery ( 'INSERT INTO t (id) VALUES (0) ' );
9216+ $ this ->assertQuery ( 'INSERT INTO t (id) VALUES (100) ' );
9217+
9218+ $ result = $ this ->assertQuery ( 'SELECT * FROM t ' );
9219+ $ this ->assertCount ( 2 , $ result );
92109220 }
92119221}
You can’t perform that action at this time.
0 commit comments