File tree Expand file tree Collapse file tree
tests/system/Database/Live Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ abstract class AbstractGetFieldDataTest extends CIUnitTestCase
2626 protected $ db ;
2727
2828 protected Forge $ forge ;
29+ protected string $ table = 'test1 ' ;
2930
3031 protected function setUp (): void
3132 {
@@ -46,12 +47,12 @@ protected function tearDown(): void
4647 {
4748 parent ::tearDown ();
4849
49- $ this ->forge ->dropTable (' test1 ' , true );
50+ $ this ->forge ->dropTable ($ this -> table , true );
5051 }
5152
5253 protected function createTable ()
5354 {
54- $ this ->forge ->dropTable (' test1 ' , true );
55+ $ this ->forge ->dropTable ($ this -> table , true );
5556
5657 $ this ->forge ->addField ([
5758 'id ' => [
@@ -88,7 +89,7 @@ protected function createTable()
8889 ],
8990 ]);
9091 $ this ->forge ->addKey ('id ' , true );
91- $ this ->forge ->createTable (' test1 ' );
92+ $ this ->forge ->createTable ($ this -> table );
9293 }
9394
9495 abstract public function testGetFieldDataDefault (): void ;
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ private function isOldMySQL(): bool
4848
4949 public function testGetFieldDataDefault (): void
5050 {
51- $ fields = $ this ->db ->getFieldData (' test1 ' );
51+ $ fields = $ this ->db ->getFieldData ($ this -> table );
5252
5353 $ this ->assertJsonStringEqualsJsonString (
5454 json_encode ([
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ protected function createForge(): void
3434
3535 public function testGetFieldDataDefault (): void
3636 {
37- $ fields = $ this ->db ->getFieldData (' test1 ' );
37+ $ fields = $ this ->db ->getFieldData ($ this -> table );
3838
3939 $ data = [];
4040
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ protected function createForge(): void
3434
3535 public function testGetFieldDataDefault (): void
3636 {
37- $ fields = $ this ->db ->getFieldData (' test1 ' );
37+ $ fields = $ this ->db ->getFieldData ($ this -> table );
3838
3939 $ this ->assertJsonStringEqualsJsonString (
4040 json_encode ([
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ protected function createForge(): void
3838
3939 public function testGetFieldDataDefault (): void
4040 {
41- $ fields = $ this ->db ->getFieldData (' test1 ' );
41+ $ fields = $ this ->db ->getFieldData ($ this -> table );
4242
4343 $ this ->assertJsonStringEqualsJsonString (
4444 json_encode ([
@@ -105,7 +105,7 @@ public function testGetFieldDataDefault(): void
105105
106106 protected function createTableCompositePrimaryKey ()
107107 {
108- $ this ->forge ->dropTable (' test1 ' , true );
108+ $ this ->forge ->dropTable ($ this -> table , true );
109109
110110 $ this ->forge ->addField ([
111111 'pk1 ' => [
@@ -122,14 +122,14 @@ protected function createTableCompositePrimaryKey()
122122 ],
123123 ]);
124124 $ this ->forge ->addPrimaryKey (['pk1 ' , 'pk2 ' ]);
125- $ this ->forge ->createTable (' test1 ' );
125+ $ this ->forge ->createTable ($ this -> table );
126126 }
127127
128128 public function testGetFieldDataCompositePrimaryKey (): void
129129 {
130130 $ this ->createTableCompositePrimaryKey ();
131131
132- $ fields = $ this ->db ->getFieldData (' test1 ' );
132+ $ fields = $ this ->db ->getFieldData ($ this -> table );
133133
134134 $ this ->assertJsonStringEqualsJsonString (
135135 json_encode ([
You can’t perform that action at this time.
0 commit comments