1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-30 17:29:53 +02:00

tests: test() with description

This commit is contained in:
David Grudl
2020-08-16 16:10:27 +02:00
parent 0ee4628712
commit 6e41c4223b
4 changed files with 17 additions and 19 deletions

View File

@@ -12,7 +12,7 @@ use Tester\Assert;
require __DIR__ . '/bootstrap.php';
test(function () use ($config) {
test('', function () use ($config) {
$conn = new Connection($config);
Assert::true($conn->isConnected());
@@ -21,7 +21,7 @@ test(function () use ($config) {
});
test(function () use ($config) { // lazy
test('lazy', function () use ($config) {
$conn = new Connection($config + ['lazy' => true]);
Assert::false($conn->isConnected());
@@ -30,7 +30,7 @@ test(function () use ($config) { // lazy
});
test(function () use ($config) {
test('', function () use ($config) {
$conn = new Connection($config);
Assert::true($conn->isConnected());
@@ -40,7 +40,7 @@ test(function () use ($config) {
});
test(function () use ($config) {
test('', function () use ($config) {
$conn = new Connection($config);
Assert::true($conn->isConnected());
@@ -52,7 +52,7 @@ test(function () use ($config) {
});
test(function () use ($config) {
test('', function () use ($config) {
$conn = new Connection($config);
Assert::equal('hello', $conn->query('SELECT %s', 'hello')->fetchSingle());
@@ -63,7 +63,7 @@ test(function () use ($config) {
});
test(function () use ($config) {
test('', function () use ($config) {
Assert::exception(function () use ($config) {
new Connection($config + ['onConnect' => '']);
}, InvalidArgumentException::class, "Configuration option 'onConnect' must be array.");