@@ -20,8 +20,6 @@ public function XtestCommandClass()
2020 $ command = $ db ->createCommand ();
2121
2222 $ this ->assertInstanceOf (Command::class, $ command );
23-
24- $ command ->bindValues ([]);
2523 }
2624
2725 public function disabled_testMysqliConnection ()
@@ -78,30 +76,6 @@ public function disabled_testMysqliAsynchronous()
7876 $ this ->assertEquals (3 , $ result ->num_rows );
7977 }
8078
81- public function disabled_testCreateCommandGetPromise ()
82- {
83- $ db = new Database ();
84-
85- $ cmd = $ db ->createCommand ();
86-
87- $ cmd ->sql = 'SELECT * FROM simple_table WHERE id = :id ' ;
88- $ cmd ->bind (':id ' , 1 );
89-
90- $ promise = $ cmd ->execute ();
91- $ this ->assertInstanceOf (Promise::class, $ promise );
92-
93- ////
94-
95- $ promise = $ db ->createCommand (
96- 'SELECT * FROM simple_table WHERE id = :test ' ,
97- [
98- ':test ' ,
99- 1 ,
100- ]
101- )->execute ();
102- $ this ->assertInstanceOf (Promise::class, $ promise );
103- }
104-
10579 // TODO: This test is still todo.
10680 public function disabled_testParamCounting ()
10781 {
@@ -128,37 +102,6 @@ public function disabled_testParamCounting()
128102 $ query ,
129103 'SELECT * FROM simple_table WHERE id = :test '
130104 );
131-
132- $ connection ->close ();
133- }
134-
135- public function disabled_testCommandResolvedResults ()
136- {
137- $ rowCount = false ;
138- $ failedReason = false ;
139-
140- $ db = new Database ();
141-
142- $ db ->createCommand (
143- 'SELECT * FROM simple_table WHERE id = :test ' ,
144- [':test ' => 1 ,]
145- )
146- ->execute ()
147- ->then (function (\mysqli_result $ results ) use (&$ rowCount )
148- {
149- $ rows = $ results ->fetch_all (MYSQLI_ASSOC );
150- $ rowCount = count ($ rows );
151- })
152- ->otherwise (function ($ reason ) use (&$ failedReason )
153- {
154- $ failedReason = $ reason ;
155- });
156-
157- ConnectionFactory::$ loop ->run ();
158-
159- $ this ->assertFalse ($ failedReason );
160-
161- $ this ->assertEquals (1 , $ rowCount );
162105 }
163106
164107 public function disabled_testAssertStrings ()
@@ -212,25 +155,6 @@ public function disabled_testComplexCommandParameterBinding()
212155 "INSERT INTO simple_table ( `id`, `name`, `value`, `created_at` ) VALUES ( NULL, 'John Cash', 7, NOW() ); " ,
213156 $ query
214157 );
215-
216- $ connection ->close ();
217- }
218-
219- public function disabled_testBadQuery ()
220- {
221- $ db = new Database ();
222-
223- $ failedReason = null ;
224- $ db ->createCommand ('SELECT * FROM `nonexistant_table`; ' )
225- ->execute ()
226- ->otherwise (function ($ reason ) use (&$ failedReason )
227- {
228- $ failedReason = $ reason ;
229- });
230-
231- ConnectionFactory::$ loop ->run ();
232-
233- $ this ->assertNotNull ($ failedReason );
234158 }
235159
236160 public function disabled_testPool ()
0 commit comments