diff --git a/tests/dibi/Connection.connect.phpt b/tests/dibi/Connection.connect.phpt index 2582558e5..fbc7501a1 100644 --- a/tests/dibi/Connection.connect.phpt +++ b/tests/dibi/Connection.connect.phpt @@ -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."); diff --git a/tests/dibi/PdoDriver.providedConnection.phpt b/tests/dibi/PdoDriver.providedConnection.phpt index 6f2ba007e..f9364ee3d 100644 --- a/tests/dibi/PdoDriver.providedConnection.phpt +++ b/tests/dibi/PdoDriver.providedConnection.phpt @@ -29,13 +29,11 @@ Assert::exception(function () { }, Dibi\DriverException::class, 'PDO connection in exception or warning error mode is not supported.'); -// PDO error mode: explicitly set silent -test(function () { +test('PDO error mode: explicitly set silent', function () { buildPdoDriver(PDO::ERRMODE_SILENT); }); -// PDO error mode: implicitly set silent -test(function () { +test('PDO error mode: implicitly set silent', function () { buildPdoDriver(null); }); diff --git a/tests/dibi/Result.normalize.phpt b/tests/dibi/Result.normalize.phpt index 09e1ca31c..3e00f0400 100644 --- a/tests/dibi/Result.normalize.phpt +++ b/tests/dibi/Result.normalize.phpt @@ -24,7 +24,7 @@ class MockResult extends Dibi\Result } -test(function () { +test('', function () { $result = new MockResult; $result->setType('col', Type::BOOL); @@ -46,7 +46,7 @@ test(function () { }); -test(function () { +test('', function () { $result = new MockResult; $result->setType('col', Type::TEXT); @@ -62,7 +62,7 @@ test(function () { }); -test(function () { +test('', function () { $result = new MockResult; $result->setType('col', Type::FLOAT); @@ -139,7 +139,7 @@ test(function () { }); -test(function () { +test('', function () { $result = new MockResult; $result->setType('col', Type::INTEGER); @@ -165,7 +165,7 @@ test(function () { }); -test(function () { +test('', function () { $result = new MockResult; $result->setType('col', Type::DATETIME); @@ -183,7 +183,7 @@ test(function () { }); -test(function () { +test('', function () { $result = new MockResult; $result->setType('col', Type::DATETIME); $result->setFormat(Type::DATETIME, 'Y-m-d H:i:s'); @@ -202,7 +202,7 @@ test(function () { }); -test(function () { +test('', function () { $result = new MockResult; $result->setType('col', Type::DATE); @@ -218,7 +218,7 @@ test(function () { }); -test(function () { +test('', function () { $result = new MockResult; $result->setType('col', Type::TIME); diff --git a/tests/dibi/bootstrap.php b/tests/dibi/bootstrap.php index a26588dfa..ea3f6fc6e 100644 --- a/tests/dibi/bootstrap.php +++ b/tests/dibi/bootstrap.php @@ -37,7 +37,7 @@ } -function test(Closure $function) +function test(string $title, Closure $function): void { $function(); }