Skip to content

Commit b0dbc76

Browse files
committed
update code coverage tests
1 parent d195445 commit b0dbc76

File tree

4 files changed

+126
-71
lines changed

4 files changed

+126
-71
lines changed

tests/DatabaseTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class DatabaseTest extends EZTestCase
1515
{
1616
/**
1717
* @covers ezsql\Database::Initialize
18+
* @covers \setInstance
1819
*/
1920
public function testInitialize()
2021
{
@@ -35,6 +36,7 @@ public function testInitialize()
3536

3637
/**
3738
* @covers ezsql\Database::Initialize
39+
* @covers \setInstance
3840
*/
3941
public function testInitialize_Pgsql()
4042
{
@@ -55,6 +57,7 @@ public function testInitialize_Pgsql()
5557

5658
/**
5759
* @covers ezsql\Database::Initialize
60+
* @covers \setInstance
5861
*/
5962
public function testInitialize_Sqlite3()
6063
{
@@ -75,6 +78,7 @@ public function testInitialize_Sqlite3()
7578

7679
/**
7780
* @covers ezsql\Database::Initialize
81+
* @covers \setInstance
7882
*/
7983
public function testInitialize_Sqlsrv()
8084
{
@@ -95,6 +99,7 @@ public function testInitialize_Sqlsrv()
9599

96100
/**
97101
* @covers ezsql\Database::Initialize
102+
* @covers \setInstance
98103
*/
99104
public function testInitialize_Pdo()
100105
{

tests/ezFunctionsTest.php

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -88,124 +88,124 @@ public function testDropColumn()
8888
*/
8989
public function testEq()
9090
{
91-
$this->assertInternalType('array',eq('field', 'data'));
91+
$this->assertInternalType('array', eq('field', 'data'));
9292
$this->assertArraySubset([1 => EQ], eq('field', 'data'));
9393
}
9494

9595
/**
9696
* @test neq
9797
*/
98-
public function testneq()
98+
public function testNeq()
9999
{
100-
$this->assertInternalType('array',neq('field', 'data'));
100+
$this->assertInternalType('array', neq('field', 'data'));
101101
$this->assertArraySubset([3 => _AND], neq('field', 'data', _AND));
102102
}
103103

104104
/**
105105
* @test ne
106106
*/
107-
public function testne()
107+
public function testNe()
108108
{
109-
$this->assertInternalType('array',ne('field', 'data'));
109+
$this->assertInternalType('array', ne('field', 'data'));
110110
$this->assertArraySubset([4 => 'extra'], ne('field', 'data', _AND, 'extra'));
111111
}
112112

113113
/**
114114
* @test lt
115115
*/
116-
public function testlt()
116+
public function testLt()
117117
{
118-
$this->assertInternalType('array',lt('field', 'data'));
118+
$this->assertInternalType('array', lt('field', 'data'));
119119
$this->assertArraySubset([2 => 'data'], lt('field', 'data'));
120120
}
121121

122122
/**
123123
* @test lte
124124
*/
125-
public function testlte()
125+
public function testLte()
126126
{
127-
$this->assertInternalType('array',lte('field', 'data'));
127+
$this->assertInternalType('array', lte('field', 'data'));
128128
$this->assertArraySubset([0 => 'field'], lte('field', 'data'));
129129
}
130130

131131
/**
132132
* @test gt
133133
*/
134-
public function testgt()
134+
public function testGt()
135135
{
136-
$this->assertInternalType('array',gt('field', 'data'));
136+
$this->assertInternalType('array', gt('field', 'data'));
137137
$this->assertArraySubset([0 => 'field'], gt('field', 'data'));
138138
}
139139

140140
/**
141141
* @test gte
142142
*/
143-
public function testgte()
143+
public function testGte()
144144
{
145-
$this->assertInternalType('array',gte('field', 'data'));
145+
$this->assertInternalType('array', gte('field', 'data'));
146146
$this->assertArraySubset([0 => 'field'], gte('field', 'data'));
147147
}
148148

149149
/**
150150
* @test isNull
151151
*/
152-
public function testisNull()
152+
public function testIsNull()
153153
{
154-
$this->assertInternalType('array',isNull('field'));
154+
$this->assertInternalType('array', isNull('field'));
155155
$this->assertArraySubset([2 => 'null'], isNull('field'));
156156
}
157157

158158
/**
159159
* @test isNotNull
160160
*/
161-
public function testisNotNull()
161+
public function testIsNotNull()
162162
{
163-
$this->assertInternalType('array',isNotNull('field'));
163+
$this->assertInternalType('array', isNotNull('field'));
164164
$this->assertArraySubset([2 => 'null'], isNotNull('field'));
165165
}
166166

167167
/**
168168
* @test like
169169
*/
170-
public function testlike()
170+
public function testLike()
171171
{
172-
$this->assertInternalType('array',like('field', 'data'));
172+
$this->assertInternalType('array', like('field', 'data'));
173173
$this->assertArraySubset([2 => 'data'], like('field', 'data'));
174174
}
175175

176176
/**
177177
* @test notLike
178178
*/
179-
public function testnotLike()
179+
public function testNotLike()
180180
{
181-
$this->assertInternalType('array',notLike('field', 'data'));
181+
$this->assertInternalType('array', notLike('field', 'data'));
182182
$this->assertArraySubset([2 => 'data'], notLike('field', 'data'));
183183
}
184184

185185
/**
186186
* @test in
187187
*/
188-
public function testin()
188+
public function testIn()
189189
{
190-
$this->assertInternalType('array',in('field', 'data'));
190+
$this->assertInternalType('array', in('field', 'data'));
191191
$this->assertArraySubset([8 => 'data6'], in('field', 'data', 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'));
192192
}
193193

194194
/**
195195
* @test notIn
196196
*/
197-
public function testnotIn()
197+
public function testNotIn()
198198
{
199-
$this->assertInternalType('array',notIn('field', 'data'));
199+
$this->assertInternalType('array', notIn('field', 'data'));
200200
$this->assertArraySubset([5 => 'data3'], notIn('field', 'data', 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'));
201201
}
202202

203203
/**
204204
* @test between
205205
*/
206-
public function testbetween()
206+
public function testBetween()
207207
{
208-
$this->assertInternalType('array',between('field', 'data', 'data2'));
208+
$this->assertInternalType('array', between('field', 'data', 'data2'));
209209
$this->assertArraySubset([1 => _BETWEEN], between('field', 'data', 'data2'));
210210
}
211211

@@ -214,7 +214,7 @@ public function testbetween()
214214
*/
215215
public function testNotBetween()
216216
{
217-
$this->assertInternalType('array',notBetween('field', 'data', 'data2'));
217+
$this->assertInternalType('array', notBetween('field', 'data', 'data2'));
218218
$this->assertArraySubset([3 => 'data2'], notBetween('field', 'data', 'data2'));
219219
}
220220

@@ -236,79 +236,79 @@ public function testSelect() {
236236
/**
237237
* @test select_into
238238
*/
239-
public function testselect_into() {
239+
public function testSelect_into() {
240240
$this->assertFalse(select_into('field', 'data', 'data2'));
241241
}
242242

243243
/**
244244
* @test insert_select
245245
*/
246-
public function testinsert_select() {
246+
public function testInsert_select() {
247247
$this->assertFalse(insert_select('field', 'data', 'data2'));
248248
}
249249

250250
/**
251251
* @test create_select
252252
*/
253-
public function testcreate_select() {
253+
public function testCreate_select() {
254254
$this->assertFalse(create_select('field', 'data', 'data2'));
255255
}
256256

257257
/**
258258
* @test where
259259
*/
260-
public function testwhere() {
260+
public function testWhere() {
261261
$this->assertFalse(where('field', 'data', 'data2'));
262262
}
263263

264264
/**
265265
* @test groupBy
266266
*/
267-
public function testgroupBy() {
267+
public function testGroupBy() {
268268
$this->assertFalse(groupBy(''));
269269
$this->assertNotNull(groupBy('field'));
270270
}
271271

272272
/**
273273
* @test having
274274
*/
275-
public function testhaving() {
275+
public function testHaving() {
276276
$this->assertFalse(having('field', 'data', 'data2'));
277277
}
278278

279279
/**
280280
* @test orderBy
281281
*/
282-
public function testorderBy() {
282+
public function testOrderBy() {
283283
$this->assertFalse(orderBy('', 'data'));
284284
$this->assertNotNull(orderBy('field', 'data'));
285285
}
286286

287287
/**
288288
* @test insert
289289
*/
290-
public function testinsert() {
290+
public function testInsert() {
291291
$this->assertFalse(insert('field', ['data' => 'data2']));
292292
}
293293

294294
/**
295295
* @test update
296296
*/
297-
public function testupdate() {
297+
public function testUpdate() {
298298
$this->assertFalse(update('field', 'data', 'data2'));
299299
}
300300

301301
/**
302302
* @test delete
303303
*/
304-
public function testdelete() {
304+
public function testDelete() {
305305
$this->assertFalse(delete('field', 'data', 'data2'));
306306
}
307307

308308
/**
309309
* @test replace
310310
*/
311-
public function testreplace() {
311+
public function testReplace() {
312312
$this->assertFalse(replace('field', ['data' => 'data2']));
313313
}
314314
} //

0 commit comments

Comments
 (0)