diff --git a/lib/Cake/Test/Case/Utility/FileTest.php b/lib/Cake/Test/Case/Utility/FileTest.php index 6caad2839..2ec65437f 100644 --- a/lib/Cake/Test/Case/Utility/FileTest.php +++ b/lib/Cake/Test/Case/Utility/FileTest.php @@ -74,7 +74,7 @@ class FileTest extends CakeTestCase { $result = $this->File->info(); $expecting = array( 'dirname' => dirname(__FILE__), 'basename' => basename(__FILE__), - 'extension' => 'php', 'filename' =>'FileTest' + 'extension' => 'php', 'filename' =>'FileTest', 'filesize' => filesize($file) ); $this->assertEquals($expecting, $result); diff --git a/lib/Cake/Utility/File.php b/lib/Cake/Utility/File.php index 6f3c2c02e..11d409d6d 100644 --- a/lib/Cake/Utility/File.php +++ b/lib/Cake/Utility/File.php @@ -290,6 +290,9 @@ class File { if (!isset($this->info['filename'])) { $this->info['filename'] = $this->name(); } + if (!isset($this->info['filesize'])) { + $this->info['filesize'] = $this->size(); + } return $this->info; }