File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -88,15 +88,32 @@ class Item extends FilesItem
8888/**
8989 * Write the files
9090 */
91- file_put_contents ("{$ testDir }Driver.php " , $ driverClassString );
92- file_put_contents ("{$ testDir }Item.php " , $ itemClassString );
91+
92+
93+ if (!file_put_contents ("{$ testDir }Driver.php " , $ driverClassString )
94+ || !file_put_contents ("{$ testDir }Item.php " , $ itemClassString )
95+ ){
96+ $ testHelper ->printFailText ('The php files of driver "Files2" were not written ' );
97+ $ testHelper ->terminateTest ();
98+ }else {
99+ $ testHelper ->printPassText ('The php files of driver "Files2" were written ' );
100+ }
93101
94102/**
95103 * Then adjust the Chmod
96104 */
97105chmod ("{$ testDir }Driver.php " , 0644 );
98106chmod ("{$ testDir }Item.php " , 0644 );
99107
108+ if (!class_exists (phpFastCache \CustomDriversPath \Files2 \Item::class)
109+ || !class_exists (phpFastCache \CustomDriversPath \Files2 \Driver::class)
110+ ){
111+ $ testHelper ->printFailText ('The php classes of driver "Files2" does not exists ' );
112+ $ testHelper ->terminateTest ();
113+ }else {
114+ $ testHelper ->printPassText ('The php classes of driver "Files2" were found ' );
115+ }
116+
100117CacheManager::setNamespacePath (phpFastCache \CustomDriversPath::class . '\\' );
101118$ cacheInstance = CacheManager::getInstance ('Files2 ' , []);
102119$ cacheKey = 'cacheKey ' ;
You can’t perform that action at this time.
0 commit comments