File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class TestCaseBase extends TestCase
2020{
2121 protected ConnectionInterface $ db ;
2222 protected static string $ connectName ;
23- protected bool $ isPgScriptInstalled = false ;
23+ protected static bool $ isResetPgScript = false ;
2424
2525 protected static function initModelSupport (): void
2626 {
@@ -44,10 +44,12 @@ public function setUp(): void
4444 {
4545 $ this ->db ??= Db::connect (static ::$ connectName );
4646
47- if (static ::$ connectName === 'pgsql ' && $ this ->isPgScriptInstalled ) {
48- pg_reset_function ();
47+ if (static ::$ connectName === 'pgsql ' ) {
48+ if (self ::$ isResetPgScript === false ) {
49+ pg_reset_function ();
50+ self ::$ isResetPgScript = true ;
51+ }
4952 pg_install_func ();
50- $ this ->isPgScriptInstalled = true ;
5153 }
5254
5355 // var_dump(static::class . '-' . __FUNCTION__ . '-' . spl_object_id($this));
Original file line number Diff line number Diff line change @@ -41,10 +41,6 @@ public function testInitData(): array
4141 */
4242 public function testFieldTypeSelect (array $ data )
4343 {
44- var_dump ($ this ->db ->getTableFieldsInfo ('test_field_type ' ));
45- var_dump ($ this ->db ->getSchemaInfo ('test_field_type ' ));
46- var_dump ($ this ->db ->getFieldBindType ('bigint ' ));
47-
4844 $ result = $ this ->db ->table ('test_field_type ' )->setFieldType (['bigint ' => 'string ' ])->select ();
4945 $ this ->assertNotEmpty ($ result ->count ());
5046 foreach ($ data as $ index => $ item ) {
You can’t perform that action at this time.
0 commit comments