merged master some more
[lhc/web/wiklou.git] / tests / phpunit / includes / filerepo / FileBackendTest.php
index 0b36bf1..f9f72c4 100644 (file)
@@ -885,6 +885,20 @@ class FileBackendTest extends MediaWikiTestCase {
                                "Correct file size of '$path'" );
                        $this->assertTrue( abs( time() - wfTimestamp( TS_UNIX, $time ) ) < 10,
                                "Correct file timestamp of '$path'" );
+
+                       $this->backend->clearCache( array( $path ) );
+
+                       $size = $this->backend->getFileSize( array( 'src' => $path ) );
+
+                       $this->assertEquals( strlen( $content ), $size,
+                               "Correct file size of '$path'" );
+
+                       $this->backend->preloadCache( array( $path ) );
+
+                       $size = $this->backend->getFileSize( array( 'src' => $path ) );
+
+                       $this->assertEquals( strlen( $content ), $size,
+                               "Correct file size of '$path'" );
                } else {
                        $size = $this->backend->getFileSize( array( 'src' => $path ) );
                        $time = $this->backend->getFileTimestamp( array( 'src' => $path ) );