Skip to content

Commit 985cb73

Browse files
committed
tests: TEMP_DIR replaced with getTempDir()
1 parent 127240a commit 985cb73

35 files changed

+58
-54
lines changed

tests/Bridges.DI/CacheExtension.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require __DIR__ . '/../bootstrap.php';
1616

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

2121
eval($compiler->compile());
2222

tests/Bridges.Latte/CacheMacro.cache.phpt

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

1515

1616
$latte = new Latte\Engine;
17-
$latte->setTempDirectory(TEMP_DIR);
17+
$latte->setTempDirectory(getTempDir());
1818
$latte->addMacro('cache', new CacheMacro($latte->getCompiler()));
1919
$latte->addProvider('cacheStorage', new Nette\Caching\Storages\DevNullStorage);
2020

tests/Storages/FileStorage.basic.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require __DIR__ . '/../bootstrap.php';
1818
$key = [1, true];
1919
$value = range("\x00", "\xFF");
2020

21-
$cache = new Cache(new FileStorage(TEMP_DIR));
21+
$cache = new Cache(new FileStorage(getTempDir()));
2222

2323
Assert::null($cache->load($key));
2424

tests/Storages/FileStorage.call.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Mock
3030
}
3131

3232

33-
$cache = new Cache(new FileStorage(TEMP_DIR));
33+
$cache = new Cache(new FileStorage(getTempDir()));
3434
$mock = new Mock;
3535

3636
$called = false;

tests/Storages/FileStorage.callbacks.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require __DIR__ . '/../bootstrap.php';
1717
$key = 'nette';
1818
$value = 'rulez';
1919

20-
$cache = new Cache(new FileStorage(TEMP_DIR));
20+
$cache = new Cache(new FileStorage(getTempDir()));
2121

2222

2323
function dependency($val)

tests/Storages/FileStorage.clean-all.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-
$storage = new FileStorage(TEMP_DIR);
17+
$storage = new FileStorage(getTempDir());
1818
$cacheA = new Cache($storage);
1919
$cacheB = new Cache($storage, 'B');
2020

tests/Storages/FileStorage.clean-namespace.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use Tester\Assert;
1313

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

16-
$storage = new FileStorage(TEMP_DIR);
16+
$storage = new FileStorage(getTempDir());
1717

1818
/*
1919
* Create filestorage cache without namespace and some with namespaces

tests/Storages/FileStorage.closure.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require __DIR__ . '/../bootstrap.php';
1818
$key = '../' . implode('', range("\x00", "\x1F"));
1919
$value = range("\x00", "\xFF");
2020

21-
$cache = new Cache(new FileStorage(TEMP_DIR));
21+
$cache = new Cache(new FileStorage(getTempDir()));
2222

2323
Assert::null($cache->load($key));
2424

tests/Storages/FileStorage.const.001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require __DIR__ . '/../bootstrap.php';
1717
$key = 'nette';
1818
$value = 'rulez';
1919

20-
$cache = new Cache(new FileStorage(TEMP_DIR));
20+
$cache = new Cache(new FileStorage(getTempDir()));
2121

2222

2323
define('ANY_CONST', 10);

tests/Storages/FileStorage.const.002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $key = 'nette';
1818
$value = 'rulez';
1919

2020

21-
$cache = new Cache(new FileStorage(TEMP_DIR));
21+
$cache = new Cache(new FileStorage(getTempDir()));
2222

2323

2424
// Deleting dependent const

0 commit comments

Comments
 (0)