Skip to content

Commit 6cf3106

Browse files
committed
Updated setNamespace method
1 parent 2148104 commit 6cf3106

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/phpFastCache/CacheManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ public static function getNamespacePath()
334334
*/
335335
public static function setNamespacePath($path)
336336
{
337-
self::$namespacePath = $path;
337+
self::$namespacePath = trim($path, "\\") . '\\';
338338
}
339339

340340
/**

tests/CustomNamespaces.test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class Item extends FilesItem
114114
$testHelper->printPassText('The php classes of driver "Files2" were found');
115115
}
116116

117-
CacheManager::setNamespacePath(phpFastCache\CustomDriversPath::class . '\\');
117+
CacheManager::setNamespacePath(phpFastCache\CustomDriversPath::class);
118118
$cacheInstance = CacheManager::getInstance('Files2', []);
119119
$cacheKey = 'cacheKey';
120120
$RandomCacheValue = str_shuffle(uniqid('pfc', true));

0 commit comments

Comments
 (0)