Skip to content

Commit 65df363

Browse files
committed
tests: test() with description
1 parent d1e7169 commit 65df363

File tree

6 files changed

+13
-16
lines changed

6 files changed

+13
-16
lines changed

tests/Bridges.DI/CacheExtension.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use Tester\Assert;
1414
require __DIR__ . '/../bootstrap.php';
1515

1616

17-
test(function () {
17+
test('', function () {
1818
$compiler = new DI\Compiler;
1919
$compiler->addExtension('cache', new CacheExtension(getTempDir()));
2020

tests/Bridges.Latte/CacheMacro.createCache.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use Tester\Assert;
1414

1515
require __DIR__ . '/../bootstrap.php';
1616

17-
test(function () {
17+
test('', function () {
1818
$parents = [];
1919
$dp = [Cache::TAGS => ['rum', 'cola']];
2020
$outputHelper = CacheMacro::createCache(new DevNullStorage, 'test', $parents);
@@ -23,7 +23,7 @@ test(function () {
2323
Assert::same($dp + [Cache::EXPIRATION => '+ 7 days'], $outputHelper->dependencies);
2424
});
2525

26-
test(function () {
26+
test('', function () {
2727
$parents = [];
2828
$dp = [Cache::TAGS => ['rum', 'cola']];
2929
$dpFallback = function () use ($dp) {
@@ -34,7 +34,7 @@ test(function () {
3434
Assert::same($dp + [Cache::EXPIRATION => '+ 7 days'], $outputHelper->dependencies);
3535
});
3636

37-
test(function () {
37+
test('', function () {
3838
$parents = [];
3939
$dp = [
4040
Cache::TAGS => ['rum', 'cola'],

tests/Caching/Cache.bulkLoad.phpt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ require __DIR__ . '/../bootstrap.php';
1414

1515
require __DIR__ . '/Cache.php';
1616

17-
// storage without bulk load support
18-
test(function () {
17+
test('storage without bulk load support', function () {
1918
$storage = new TestStorage;
2019
$cache = new Cache($storage, 'ns');
2120
Assert::same([1 => null, 2 => null], $cache->bulkLoad([1, 2]), 'data');
@@ -29,8 +28,7 @@ test(function () {
2928
Assert::same(2, $data[2]['data']);
3029
});
3130

32-
// storage with bulk load support
33-
test(function () {
31+
test('storage with bulk load support', function () {
3432
$storage = new BulkReadTestStorage;
3533
$cache = new Cache($storage, 'ns');
3634
Assert::same([1 => null, 2 => null], $cache->bulkLoad([1, 2]));
@@ -44,8 +42,7 @@ test(function () {
4442
Assert::same(2, $data[2]['data']);
4543
});
4644

47-
// dependencies
48-
test(function () {
45+
test('dependencies', function () {
4946
$storage = new BulkReadTestStorage;
5047
$cache = new Cache($storage, 'ns');
5148
$dependencies = [Cache::TAGS => ['tag']];
@@ -58,7 +55,7 @@ test(function () {
5855
Assert::same($dependencies, $data[1]['dependencies']);
5956
});
6057

61-
test(function () {
58+
test('', function () {
6259
Assert::exception(function () {
6360
$cache = new Cache(new BulkReadTestStorage);
6461
$cache->bulkLoad([[1]]);

tests/Storages/SQLiteJournal.permissions.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (defined('PHP_WINDOWS_VERSION_BUILD')) {
1919
}
2020

2121

22-
test(function () {
22+
test('', function () {
2323
$file = getTempDir() . '/sqlitejournal.permissions.1.sqlite';
2424
Assert::false(file_exists($file));
2525

@@ -30,7 +30,7 @@ test(function () {
3030
});
3131

3232

33-
test(function () {
33+
test('', function () {
3434
$file = getTempDir() . '/sqlitejournal.permissions.2.sqlite';
3535
Assert::false(file_exists($file));
3636

tests/Storages/SQLiteStorage.permissions.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (defined('PHP_WINDOWS_VERSION_BUILD')) {
1919
}
2020

2121

22-
test(function () {
22+
test('', function () {
2323
$file = getTempDir() . '/sqlitestorage.permissions.1.sqlite';
2424
Assert::false(file_exists($file));
2525

@@ -30,7 +30,7 @@ test(function () {
3030
});
3131

3232

33-
test(function () {
33+
test('', function () {
3434
$file = getTempDir() . '/sqlitestorage.permissions.2.sqlite';
3535
Assert::false(file_exists($file));
3636

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function getTempDir(): string
3737
}
3838

3939

40-
function test(\Closure $function): void
40+
function test(string $title, Closure $function): void
4141
{
4242
$function();
4343
}

0 commit comments

Comments
 (0)