function testReadableSize() { $this->assertEqual(Scaffold_Utils::readable_size(1), '1 bytes'); }
/** * Logs info about a file * * @author Anthony Short * @param $file * @return void */ private static function _file($file, $name = false) { if ($name === false) { $name = $file; } # Log about the compiled file $contents = file_get_contents($file); $gzipped = gzcompress($contents, 9); $table = array(); $table[] = array('Name', 'Value'); $table[] = array('Compressed Size', Scaffold_Utils::readable_size($contents)); $table[] = array('Gzipped Size', Scaffold_Utils::readable_size($gzipped)); FB::table($name, $table); }