Skip to content

Commit 0cbe886

Browse files
authored
Merge pull request #492 from Geolim4/final
Updated setNamespace method
2 parents 2d75bed + 41aae1d commit 0cbe886

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ services:
2121
before_script:
2222
- |
2323
if [[ $TRAVIS_PHP_VERSION = "hhv"* ]]; then
24-
cat bin/ci/php-phpfastcache.ini >> /etc/hhvm/php.ini
24+
cat bin/ci/php_phpfastcache.ini >> /etc/hhvm/php.ini
2525
else
26-
phpenv config-add bin/ci/php-phpfastcache.ini
26+
phpenv config-add bin/ci/php_phpfastcache.ini
2727
fi
2828
2929
php:
File renamed without changes.

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)