Skip to content

Commit b5e457b

Browse files
committed
remove test covers annotations
- the test cover annotations not needed ,they are correctly and better detected by the ci service systems. - the PDO tests annotations still needs removal.
1 parent da12438 commit b5e457b

File tree

3 files changed

+28
-297
lines changed

3 files changed

+28
-297
lines changed

tests/postgresql/postgresqlTest.php

Lines changed: 11 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function setUp(): void
3333

3434
$this->object = Database::initialize('pgsql', [self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT]);
3535
$this->object->prepareOn();
36-
} // setUp
36+
}
3737

3838
/**
3939
* Tears down the fixture, for example, closes a network connection.
@@ -42,28 +42,18 @@ protected function setUp(): void
4242
protected function tearDown(): void
4343
{
4444
$this->object = null;
45-
} // tearDown
45+
}
4646

47-
/**
48-
* @covers ezsql\Database\ez_pgsql::settings
49-
*/
5047
public function testSettings()
5148
{
5249
$this->assertTrue($this->object->settings() instanceof \ezsql\ConfigInterface);
5350
}
5451

55-
/**
56-
* @covers ezsql\Database\ez_pgsql::quick_connect
57-
*/
5852
public function testQuick_connect()
5953
{
6054
$this->assertTrue($this->object->quick_connect(self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT));
61-
} // testQuick_connect
55+
}
6256

63-
/**
64-
* @covers ezsql\Database\ez_pgsql::connect
65-
*
66-
*/
6757
public function testConnect()
6858
{
6959
$this->errors = array();
@@ -74,30 +64,20 @@ public function testConnect()
7464
$this->assertTrue($this->object->connect(self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT));
7565

7666
$this->assertTrue($this->object->connect());
77-
} // testConnect
67+
}
7868

79-
/**
80-
* @covers ezsql\Database\ez_pgsql::escape
81-
*/
8269
public function testEscape()
8370
{
8471
$result = $this->object->escape("This is'nt escaped.");
8572

8673
$this->assertEquals("This is''nt escaped.", $result);
87-
} // testEscape
74+
}
8875

89-
/**
90-
* @covers ezsql\Database\ez_pgsql::sysDate
91-
*/
9276
public function testSysdate()
9377
{
9478
$this->assertEquals('NOW()', $this->object->sysDate());
9579
}
9680

97-
/**
98-
* @covers ezsql\Database\ez_pgsql::query
99-
* @covers ezsql\Database\ez_pgsql::processQueryResult
100-
*/
10181
public function testQuery()
10282
{
10383
$this->assertTrue($this->object->connect(self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT));
@@ -112,11 +92,8 @@ public function testQuery()
11292
$this->assertFalse($this->object->query('INSERT INTO unit_test(test_key, test_value) VALUES(\'test 3\', \'testing string 3\')'));
11393

11494
$this->assertEquals(0, $this->object->query('DROP TABLE unit_test'));
115-
} // testQuery
95+
}
11696

117-
/**
118-
* @covers ezsql\ezQuery::create
119-
*/
12097
public function testCreate()
12198
{
12299
$this->object->connect(self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT);
@@ -142,19 +119,13 @@ public function testCreate()
142119
$this->object->prepareOn();
143120
}
144121

145-
/**
146-
* @covers ezsql\ezQuery::drop
147-
*/
148122
public function testDrop()
149123
{
150124
$this->object->connect(self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT);
151125

152126
$this->assertEquals($this->object->drop('new_create_test'), 0);
153127
}
154128

155-
/**
156-
* @covers ezsql\ezQuery::insert
157-
*/
158129
public function testInsert()
159130
{
160131
$this->object->connect(self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT);
@@ -165,9 +136,6 @@ public function testInsert()
165136
$this->assertEquals(0, $this->object->query('DROP TABLE unit_test'));
166137
}
167138

168-
/**
169-
* @covers ezsql\ezQuery::update
170-
*/
171139
public function testUpdate()
172140
{
173141
$this->object->connect(self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT);
@@ -205,9 +173,6 @@ public function testUpdate()
205173
$this->assertEquals(0, $this->object->query('DROP TABLE unit_test'));
206174
}
207175

208-
/**
209-
* @covers ezsql\ezQuery::delete
210-
*/
211176
public function testDelete()
212177
{
213178
$this->object->connect(self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT);
@@ -240,11 +205,6 @@ public function testDelete()
240205
$this->assertEquals(0, $this->object->query('DROP TABLE unit_test'));
241206
}
242207

243-
/**
244-
* @covers ezsql\Database\ez_pgsql::disconnect
245-
* @covers ezsql\Database\ez_pgsql::reset
246-
* @covers ezsql\Database\ez_pgsql::handle
247-
*/
248208
public function testDisconnect()
249209
{
250210
$this->object->connect(self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT);
@@ -254,33 +214,20 @@ public function testDisconnect()
254214
$this->assertFalse($this->object->isConnected());
255215
$this->object->reset();
256216
$this->assertNull($this->object->handle());
257-
} // testDisconnect
217+
}
258218

259-
/**
260-
* @covers ezsql\Database\ez_pgsql::getHost
261-
*/
262219
public function testGetHost()
263220
{
264221
$this->assertEquals(self::TEST_DB_HOST, $this->object->getHost());
265-
} // testGetDBHost
222+
}
266223

267-
/**
268-
* @covers ezsql\Database\ez_pgsql::getPort
269-
*/
270224
public function testGetPort()
271225
{
272226
$this->object->connect(self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT);
273227

274228
$this->assertEquals(self::TEST_DB_PORT, $this->object->getPort());
275-
} // testGetPort
229+
}
276230

277-
/**
278-
* @covers ezsql\ezQuery::selecting
279-
* @covers ezsql\Database\ez_pgsql::query
280-
* @covers ezsql\Database\ez_pgsql::processQueryResult
281-
* @covers ezsql\Database\ez_pgsql::prepareValues
282-
* @covers ezsql\Database\ez_pgsql::query_prepared
283-
*/
284231
public function testSelecting()
285232
{
286233
$this->object->connect(self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT);
@@ -317,15 +264,6 @@ public function testSelecting()
317264
$this->assertEquals(0, $this->object->query('DROP TABLE unit_test'));
318265
}
319266

320-
/**
321-
* @covers ezsql\ezQuery::selecting
322-
* @covers ezsql\Database\ez_pgsql::commit
323-
* @covers ezsql\Database\ez_pgsql::beginTransaction
324-
* @covers ezsql\Database\ez_pgsql::query
325-
* @covers ezsql\Database\ez_pgsql::processQueryResult
326-
* @covers ezsql\Database\ez_pgsql::prepareValues
327-
* @covers ezsql\Database\ez_pgsql::query_prepared
328-
*/
329267
public function testBeginTransactionCommit()
330268
{
331269
$this->object->connect();
@@ -359,14 +297,6 @@ public function testBeginTransactionCommit()
359297
}
360298
}
361299

362-
/**
363-
* @covers ezsql\Database\ez_pgsql::rollback
364-
* @covers ezsql\Database\ez_pgsql::beginTransaction
365-
* @covers ezsql\Database\ez_pgsql::query
366-
* @covers ezsql\Database\ez_pgsql::processQueryResult
367-
* @covers ezsql\Database\ez_pgsql::prepareValues
368-
* @covers ezsql\Database\ez_pgsql::query_prepared
369-
*/
370300
public function testBeginTransactionRollback()
371301
{
372302
$this->object->connect();
@@ -413,15 +343,6 @@ public function testBeginTransactionRollback()
413343
}
414344
}
415345

416-
/**
417-
* @covers ezsql\ezQuery::drop
418-
* @covers ezsql\ezQuery::create
419-
* @covers ezsql\ezsqlModel::queryResult
420-
* @covers ezsql\Database\ez_pgsql::query
421-
* @covers ezsql\Database\ez_pgsql::processQueryResult
422-
* @covers ezsql\Database\ez_pgsql::prepareValues
423-
* @covers ezsql\Database\ez_pgsql::query_prepared
424-
*/
425346
public function testQuery_prepared()
426347
{
427348
$this->object->prepareOff();
@@ -449,24 +370,18 @@ public function testQuery_prepared()
449370
}
450371

451372
$this->object->drop('prepare_test');
452-
} // testQuery_prepared
373+
}
453374

454-
/**
455-
* @covers ezsql\Database\ez_pgsql::__construct
456-
*/
457375
public function test__Construct_Error()
458376
{
459377
$this->expectExceptionMessageRegExp('/[Missing configuration details]/');
460378
$this->assertNull(new ez_pgsql());
461379
}
462380

463-
/**
464-
* @covers ezsql\Database\ez_pgsql::__construct
465-
*/
466381
public function test__construct()
467382
{
468383
unset($GLOBALS['ez' . \PGSQL]);
469384
$settings = new Config('pgsql', [self::TEST_DB_USER, self::TEST_DB_PASSWORD, self::TEST_DB_NAME, self::TEST_DB_HOST, self::TEST_DB_PORT]);
470385
$this->assertNotNull(new ez_pgsql($settings));
471386
}
472-
} // ezsql\Database\ez_pgsqlTest
387+
}

0 commit comments

Comments
 (0)