Skip to content

Commit 6bbfb23

Browse files
committed
tests: improved descriptions
1 parent 5732def commit 6bbfb23

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

tests/dibi/Connection.connect.phpt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use Tester\Assert;
1212
require __DIR__ . '/bootstrap.php';
1313

1414

15-
test('', function () use ($config) {
15+
test('immediate connection and disconnection state', function () use ($config) {
1616
$conn = new Connection($config);
1717
Assert::true($conn->isConnected());
1818

@@ -21,7 +21,7 @@ test('', function () use ($config) {
2121
});
2222

2323

24-
test('lazy', function () use ($config) {
24+
test('lazy connection initiated on first query', function () use ($config) {
2525
$conn = new Connection($config + ['lazy' => true]);
2626
Assert::false($conn->isConnected());
2727

@@ -30,7 +30,7 @@ test('lazy', function () use ($config) {
3030
});
3131

3232

33-
test('', function () use ($config) {
33+
test('config retrieval and driver instance access', function () use ($config) {
3434
$conn = new Connection($config);
3535
Assert::true($conn->isConnected());
3636

@@ -40,7 +40,7 @@ test('', function () use ($config) {
4040
});
4141

4242

43-
test('', function () use ($config) {
43+
test('idempotent disconnect calls', function () use ($config) {
4444
$conn = new Connection($config);
4545
Assert::true($conn->isConnected());
4646

@@ -52,7 +52,7 @@ test('', function () use ($config) {
5252
});
5353

5454

55-
test('', function () use ($config) {
55+
test('reconnect after disconnection', function () use ($config) {
5656
$conn = new Connection($config);
5757
Assert::equal('hello', $conn->query('SELECT %s', 'hello')->fetchSingle());
5858

@@ -63,7 +63,7 @@ test('', function () use ($config) {
6363
});
6464

6565

66-
test('', function () use ($config) {
66+
test('destructor disconnects active connection', function () use ($config) {
6767
$conn = new Connection($config);
6868
Assert::true($conn->isConnected());
6969

@@ -72,7 +72,7 @@ test('', function () use ($config) {
7272
});
7373

7474

75-
test('', function () use ($config) {
75+
test('invalid onConnect option triggers exceptions', function () use ($config) {
7676
Assert::exception(
7777
fn() => new Connection($config + ['onConnect' => '']),
7878
InvalidArgumentException::class,

tests/dibi/Result.normalize.phpt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MockResult extends Dibi\Result
2525
}
2626

2727

28-
test('', function () {
28+
test('native text conversion preserves boolean values', function () {
2929
$result = new MockResult;
3030
$result->setType('col', Type::Text);
3131
$result->setFormat(Type::Text, 'native');
@@ -36,7 +36,7 @@ test('', function () {
3636
});
3737

3838

39-
test('', function () {
39+
test('boolean conversion from diverse representations', function () {
4040
$result = new MockResult;
4141
$result->setType('col', Type::Bool);
4242

@@ -58,7 +58,7 @@ test('', function () {
5858
});
5959

6060

61-
test('', function () {
61+
test('text conversion of booleans and numerics', function () {
6262
$result = new MockResult;
6363
$result->setType('col', Type::Text);
6464

@@ -74,7 +74,7 @@ test('', function () {
7474
});
7575

7676

77-
test('', function () {
77+
test('float conversion with various numeric formats', function () {
7878
$result = new MockResult;
7979
$result->setType('col', Type::Float);
8080

@@ -214,7 +214,7 @@ test('', function () {
214214
});
215215

216216

217-
test('', function () {
217+
test('strict integer conversion with error on empty string', function () {
218218
$result = new MockResult;
219219
$result->setType('col', Type::Integer);
220220

@@ -244,7 +244,7 @@ test('', function () {
244244
});
245245

246246

247-
test('', function () {
247+
test('dateTime conversion with object instantiation', function () {
248248
$result = new MockResult;
249249
$result->setType('col', Type::DateTime);
250250

@@ -263,7 +263,7 @@ test('', function () {
263263
});
264264

265265

266-
test('', function () {
266+
test('dateTime conversion using custom format', function () {
267267
$result = new MockResult;
268268
$result->setType('col', Type::DateTime);
269269
$result->setFormat(Type::DateTime, 'Y-m-d H:i:s');
@@ -283,7 +283,7 @@ test('', function () {
283283
});
284284

285285

286-
test('', function () {
286+
test('date conversion to DateTime instance', function () {
287287
$result = new MockResult;
288288
$result->setType('col', Type::Date);
289289

@@ -300,7 +300,7 @@ test('', function () {
300300
});
301301

302302

303-
test('', function () {
303+
test('time conversion to DateTime instance', function () {
304304
$result = new MockResult;
305305
$result->setType('col', Type::Time);
306306

0 commit comments

Comments
 (0)