Skip to content

Commit bc8cfea

Browse files
committed
tests: used @phpextension
1 parent cb61035 commit bc8cfea

11 files changed

+13
-41
lines changed

tests/Storages/FileStorage.priority.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* Test: Nette\Caching\Storages\FileStorage priority test.
5+
* @phpExtension pdo_sqlite
56
*/
67

78
declare(strict_types=1);

tests/Storages/FileStorage.tags.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* Test: Nette\Caching\Storages\FileStorage tags dependency test.
5+
* @phpExtension pdo_sqlite
56
*/
67

78
declare(strict_types=1);

tests/Storages/SQLiteJournal.permissions.phpt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* Test: Nette\Caching\Storages\SQLiteJournal database file permissions.
5+
* @phpExtension pdo_sqlite
56
*/
67

78
declare(strict_types=1);
@@ -13,9 +14,7 @@ use Tester\Assert;
1314
require __DIR__ . '/../bootstrap.php';
1415

1516

16-
if (!extension_loaded('pdo_sqlite')) {
17-
Tester\Environment::skip('Requires PHP extension pdo_sqlite.');
18-
} elseif (defined('PHP_WINDOWS_VERSION_BUILD')) {
17+
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
1918
Tester\Environment::skip('UNIX test only.');
2019
}
2120

tests/Storages/SQLiteJournal.phpt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* Test: Nette\Caching\Storages\SQLiteJournal basic test.
5+
* @phpExtension pdo_sqlite
56
*/
67

78
declare(strict_types=1);
@@ -13,11 +14,6 @@ require __DIR__ . '/../bootstrap.php';
1314
require __DIR__ . '/IJournalTestCase.php';
1415

1516

16-
if (!extension_loaded('pdo_sqlite')) {
17-
Tester\Environment::skip('Requires PHP extension pdo_sqlite.');
18-
}
19-
20-
2117
class SQLiteJournalTest extends IJournalTestCase
2218
{
2319
public function createJournal()

tests/Storages/SQLiteStorage.basic.phpt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* Test: Nette\Caching\Storages\SQLiteStorage basic usage.
5+
* @phpExtension pdo_sqlite
56
*/
67

78
declare(strict_types=1);
@@ -14,11 +15,6 @@ use Tester\Assert;
1415
require __DIR__ . '/../bootstrap.php';
1516

1617

17-
if (!extension_loaded('pdo_sqlite')) {
18-
Tester\Environment::skip('Requires PHP extension pdo_sqlite.');
19-
}
20-
21-
2218
// key and data with special chars
2319
$key = [1, true];
2420
$value = range("\x00", "\xFF");

tests/Storages/SQLiteStorage.bulkRead.phpt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* Test: Nette\Caching\Storages\SQLiteStorage and bulk read.
5+
* @phpExtension pdo_sqlite
56
*/
67

78
declare(strict_types=1);
@@ -14,11 +15,6 @@ use Tester\Assert;
1415
require __DIR__ . '/../bootstrap.php';
1516

1617

17-
if (!extension_loaded('pdo_sqlite')) {
18-
Tester\Environment::skip('Requires PHP extension pdo_sqlite.');
19-
}
20-
21-
2218
$cache = new Cache(new SQLiteStorage(':memory:'));
2319
$cache->save('foo', 'bar');
2420

tests/Storages/SQLiteStorage.expiration.phpt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* Test: Nette\Caching\Storages\SQLiteStorage expiration test.
5+
* @phpExtension pdo_sqlite
56
*/
67

78
declare(strict_types=1);
@@ -14,11 +15,6 @@ use Tester\Assert;
1415
require __DIR__ . '/../bootstrap.php';
1516

1617

17-
if (!extension_loaded('pdo_sqlite')) {
18-
Tester\Environment::skip('Requires PHP extension pdo_sqlite.');
19-
}
20-
21-
2218
$key = 'nette';
2319
$value = 'rulez';
2420

tests/Storages/SQLiteStorage.permissions.phpt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* Test: Nette\Caching\Storages\SQLiteStorage database file permissions.
5+
* @phpExtension pdo_sqlite
56
*/
67

78
declare(strict_types=1);
@@ -13,9 +14,7 @@ use Tester\Assert;
1314
require __DIR__ . '/../bootstrap.php';
1415

1516

16-
if (!extension_loaded('pdo_sqlite')) {
17-
Tester\Environment::skip('Requires PHP extension pdo_sqlite.');
18-
} elseif (defined('PHP_WINDOWS_VERSION_BUILD')) {
17+
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
1918
Tester\Environment::skip('UNIX test only.');
2019
}
2120

tests/Storages/SQLiteStorage.sliding.phpt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* Test: Nette\Caching\Storages\SQLiteStorage expiration test.
5+
* @phpExtension pdo_sqlite
56
*/
67

78
declare(strict_types=1);
@@ -14,11 +15,6 @@ use Tester\Assert;
1415
require __DIR__ . '/../bootstrap.php';
1516

1617

17-
if (!extension_loaded('pdo_sqlite')) {
18-
Tester\Environment::skip('Requires PHP extension pdo_sqlite.');
19-
}
20-
21-
2218
$key = 'nette';
2319
$value = 'rulez';
2420

tests/Storages/SQLiteStorage.tags.phpt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* Test: Nette\Caching\Storages\SQLiteStorage tags dependency test.
5+
* @phpExtension pdo_sqlite
56
*/
67

78
declare(strict_types=1);
@@ -14,11 +15,6 @@ use Tester\Assert;
1415
require __DIR__ . '/../bootstrap.php';
1516

1617

17-
if (!extension_loaded('pdo_sqlite')) {
18-
Tester\Environment::skip('Requires PHP extension pdo_sqlite.');
19-
}
20-
21-
2218
$cache = new Cache(new SQLiteStorage(':memory:'));
2319

2420

0 commit comments

Comments
 (0)