File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ public function accessInaccessibleMember($obj, $prop)
255255 */
256256 public function exceptionHandler (\Throwable $ exception )
257257 {
258- if ($ exception instanceof PhpfastcacheDriverCheckException || $ exception -> getPrevious () instanceof PhpfastcacheDriverCheckException ) {
258+ if ($ exception instanceof PhpfastcacheDriverCheckException) {
259259 $ this ->printSkipText ('A driver could not be initialized due to missing requirement: ' . $ exception ->getMessage ());
260260 $ this ->exitCode = 0 ;
261261 } else {
Original file line number Diff line number Diff line change 77
88use Phpfastcache \CacheManager ;
99use Phpfastcache \Drivers \Mongodb \Config ;
10+ use Phpfastcache \Exceptions \PhpfastcacheDriverCheckException ;
1011use Phpfastcache \Exceptions \phpFastCacheDriverException ;
1112use Phpfastcache \Helper \TestHelper ;
1213
1314chdir (__DIR__ );
1415require_once __DIR__ . '/../vendor/autoload.php ' ;
1516$ testHelper = new TestHelper ('Mongodb driver ' );
16- $ cacheInstance = CacheManager::getInstance ('Mongodb ' , new Config ([
17- 'databaseName ' => 'pfc_test ' ,
18- 'username ' => 'travis ' ,
19- 'password ' => 'test ' ,
20- ]));
17+
18+ try {
19+ $ cacheInstance = CacheManager::getInstance ('Mongodb ' , new Config ([
20+ 'databaseName ' => 'pfc_test ' ,
21+ 'username ' => 'travis ' ,
22+ 'password ' => 'test ' ,
23+ ]));
24+ }catch (PhpfastcacheDriverCheckException $ exception ){
25+ $ testHelper ->exceptionHandler ($ exception );
26+ $ testHelper ->terminateTest ();
27+ }
28+
2129
2230$ cacheKey = str_shuffle (uniqid ('pfc ' , true ));
2331$ cacheValue = str_shuffle (uniqid ('pfc ' , true ));
You can’t perform that action at this time.
0 commit comments