@@ -97,6 +97,31 @@ public function testSimple() {
9797 $ this ->assertEquals ($ cacheData1 , $ this ->cache ->get ($ id1 ));
9898 }
9999
100+ public function testCacheEntryGetters () {
101+ $ file1 = 'foo ' ;
102+ $ data1 = ['size ' => 100 , 'mtime ' => 50 , 'mimetype ' => 'foo/file ' ];
103+
104+ $ id1 = $ this ->cache ->put ($ file1 , $ data1 );
105+ $ entry = $ this ->cache ->get ($ file1 );
106+
107+ $ this ->assertEquals ($ entry ->getId (), $ id1 );
108+ $ this ->assertEquals ($ entry ->getStorageId (), $ this ->cache ->getNumericStorageId ());
109+ $ this ->assertEquals ($ entry ->getPath (), 'foo ' );
110+ $ this ->assertEquals ($ entry ->getName (), 'foo ' );
111+ $ this ->assertEquals ($ entry ->getMimeType (), 'foo/file ' );
112+ $ this ->assertEquals ($ entry ->getMimePart (), 'foo ' );
113+ $ this ->assertEquals ($ entry ->getSize (), 100 );
114+ $ this ->assertEquals ($ entry ->getMTime (), 50 );
115+ $ this ->assertEquals ($ entry ->getStorageMTime (), 50 );
116+ $ this ->assertEquals ($ entry ->getEtag (), null );
117+ $ this ->assertEquals ($ entry ->getPermissions (), 0 );
118+ $ this ->assertEquals ($ entry ->isEncrypted (), false );
119+ $ this ->assertEquals ($ entry ->getMetadataEtag (), null );
120+ $ this ->assertEquals ($ entry ->getCreationTime (), null );
121+ $ this ->assertEquals ($ entry ->getUploadTime (), null );
122+ $ this ->assertEquals ($ entry ->getUnencryptedSize (), 100 );
123+ }
124+
100125 public function testPartial () {
101126 $ file1 = 'foo ' ;
102127
0 commit comments