@@ -41,13 +41,15 @@ public function testClean()
4141
4242 /**
4343 * @covers ezsql\ezQuery::having
44+ * @covers ezsql\ezQuery::retrieveConditions
45+ * @covers \in
4446 */
4547 public function testHaving ()
4648 {
4749 $ this ->assertFalse ($ this ->object ->having ('' ));
4850 $ this ->assertEmpty ($ this ->object ->having ());
4951
50- $ expect = $ this ->object ->having (" other_test in testing 1 testing 2 testing 3 testing 4 testing 5 " );
52+ $ expect = $ this ->object ->having (in ( ' other_test ' , ' testing 1 ' , ' testing 2 ' , ' testing 3 ' , ' testing 4 ' , ' testing 5 ' ) );
5153
5254 $ this ->assertContains ('HAVING ' , $ expect );
5355 }
@@ -56,16 +58,19 @@ public function testHaving()
5658 * @covers ezsql\ezQuery::where
5759 * @covers ezsql\ezQuery::conditionIs
5860 * @covers ezsql\ezQuery::conditionBetween
61+ * @covers ezsql\ezQuery::retrieveConditions
5962 * @covers ezsql\ezQuery::conditions
6063 * @covers ezsql\ezQuery::conditionIn
6164 * @covers ezsql\ezQuery::isPrepareOn
65+ * @covers \in
66+ * @covers \like
6267 */
6368 public function testWhere ()
6469 {
6570 $ this ->assertFalse ($ this ->object ->where ('' ));
6671 $ this ->assertEmpty ($ this ->object ->where ());
6772
68- $ expect = $ this ->object ->where (" where_test in testing 1 testing 2 testing 3 testing 4 testing 5 " );
73+ $ expect = $ this ->object ->where (in ( ' where_test ' , ' testing 1 ' , ' testing 2 ' , ' testing 3 ' , ' testing 4 ' , ' testing 5 ' ) );
6974
7075 $ this ->assertContains ('WHERE ' , $ expect );
7176 $ this ->assertContains ('IN ' , $ expect );
@@ -89,6 +94,7 @@ public function testWhere()
8994 * @covers ezsql\ezQuery::where
9095 * @covers ezsql\ezQuery::conditionIs
9196 * @covers ezsql\ezQuery::conditionBetween
97+ * @covers ezsql\ezQuery::retrieveConditions
9298 * @covers ezsql\ezQuery::conditions
9399 * @covers ezsql\ezQuery::conditionIn
94100 */
@@ -138,7 +144,7 @@ public function testAddPrepare()
138144 public function testDelete ()
139145 {
140146 $ this ->assertFalse ($ this ->object ->delete ('' ));
141- $ this ->assertFalse ($ this ->object ->delete ('test_unit_delete ' ,array ('good ' ,'bad ' )));
147+ $ this ->assertFalse ($ this ->object ->delete ('test_unit_delete ' , array ('good ' , 'bad ' )));
142148 }
143149
144150 /**
@@ -147,51 +153,49 @@ public function testDelete()
147153 */
148154 public function testSelecting ()
149155 {
150- $ this ->assertFalse ($ this ->object ->selecting ('' ,'' ));
151- //$this->expectException(\Error::class);
152- //$this->expectExceptionMessageRegExp('/[Call to undefined method ezsql\ezQuery::get_results()]/');
153- $ this ->assertNotNull ($ this ->object ->selecting ('table ' ,'columns ' ,'WHERE ' ,'GROUP BY ' ,'HAVING ' ,'ORDER BY ' ,'LIMIT ' ));
156+ $ this ->assertFalse ($ this ->object ->selecting ('' , '' ));
157+ $ this ->assertNotNull ($ this ->object ->selecting ('table ' , 'columns ' , 'WHERE ' , 'GROUP BY ' , 'HAVING ' , 'ORDER BY ' , 'LIMIT ' ));
154158 }
155159
156160 /**
157161 * @covers ezsql\ezQuery::create_select
158162 */
159163 public function testCreate_select ()
160164 {
161- $ this ->assertFalse ($ this ->object ->create_select ('' ,'' ,'' ));
165+ $ this ->assertFalse ($ this ->object ->create_select ('' , '' , '' ));
162166 }
163167
164168 /**
165169 * @covers ezsql\ezQuery::insert_select
166170 */
167171 public function testInsert_select ()
168172 {
169- $ this ->assertFalse ($ this ->object ->insert_select ('' ,'' ,'' ));
173+ $ this ->assertFalse ($ this ->object ->insert_select ('' , '' , '' ));
170174 }
171175
172176 /**
173177 * @covers ezsql\ezQuery::insert
174178 */
175179 public function testInsert ()
176180 {
177- $ this ->assertFalse ($ this ->object ->insert ('' ,'' ));
181+ $ this ->assertFalse ($ this ->object ->insert ('' , '' ));
178182 }
179183
180184 /**
181185 * @covers ezsql\ezQuery::update
182186 */
183187 public function testUpdate ()
184188 {
185- $ this ->assertFalse ($ this ->object ->update ('' ,'' ));
186- $ this ->assertFalse ($ this ->object ->update ('test_unit_delete ' ,array ('test_unit_update ' => 'date() ' ),'' ));
189+ $ this ->assertFalse ($ this ->object ->update ('' , '' ));
190+ $ this ->assertFalse ($ this ->object ->update ('test_unit_delete ' , array ('test_unit_update ' => 'date() ' ),'' ));
187191 }
188192
189193 /**
190194 * @covers ezsql\ezQuery::replace
191195 */
192196 public function testReplace ()
193197 {
194- $ this ->assertFalse ($ this ->object ->replace ('' ,'' ));
198+ $ this ->assertFalse ($ this ->object ->replace ('' , '' ));
195199 }
196200
197201 /**
0 commit comments