@@ -68,29 +68,20 @@ public function testCachedLoad()
6868 $ contents = file_get_contents (dirname (__DIR__ ) . '/testData/cached.ini ' );
6969 file_put_contents ($ tempFile , $ contents );
7070
71- $ provider = new \Packaged \Config \Provider \Ini \CachedIniConfigProvider (
72- [$ dir ], $ filename , false , 3
73- );
71+ $ provider = new \Packaged \Config \Provider \Ini \CachedIniConfigProvider ([$ dir ], $ filename , false , 3 );
7472 $ this ->assertEquals ("value2 " , $ provider ->getItem ("main " , "item2 " ));
7573
7674 // replace the value of item2 in the temp file
77- file_put_contents (
78- $ tempFile ,
79- str_replace ('value2 ' , 'new_value_2 ' , $ contents )
80- );
75+ file_put_contents ($ tempFile , str_replace ('value2 ' , 'new_value_2 ' , $ contents ));
8176
8277 // 3 seconds should not have passed yet so the value should be returned from the cache
83- $ provider = new \Packaged \Config \Provider \Ini \CachedIniConfigProvider (
84- [$ dir ], $ filename , false , 3
85- );
78+ $ provider = new \Packaged \Config \Provider \Ini \CachedIniConfigProvider ([$ dir ], $ filename , false , 3 );
8679 $ this ->assertEquals ("value2 " , $ provider ->getItem ("main " , "item2 " ));
8780
8881 sleep (3 );
8982
9083 // TTL expired, should load from the file again
91- $ provider = new \Packaged \Config \Provider \Ini \CachedIniConfigProvider (
92- [$ dir ], $ filename , false , 3
93- );
84+ $ provider = new \Packaged \Config \Provider \Ini \CachedIniConfigProvider ([$ dir ], $ filename , false , 3 );
9485 $ this ->assertEquals ("new_value_2 " , $ provider ->getItem ("main " , "item2 " ));
9586
9687 unlink ($ tempFile );
0 commit comments