public function testParseMeminfo() { $tests = array('meminfo.ubuntu14.txt' => array('total' => 7843336192, 'free' => 3758297088)); $dir = dirname(__FILE__) . '/memory'; foreach ($tests as $input => $expect) { $raw = Filesystem::readFile($dir . '/' . $input); $actual = PhutilSystem::parseMemInfo($raw); $this->assertEqual($expect, $actual, pht('Parse of "%s".', $input)); } }