/** * @covers think\Debug::getMemPeak * @todo Implement testGetMemPeak(). */ public function testGetMemPeak() { $start = "testGetMemPeakStart"; $end = "testGetMemPeakEnd"; \think\Debug::remark($start); $str = ""; for ($i = 0; $i < 100000; $i++) { $str .= "mem"; } $memPeak = \think\Debug::getMemPeak($start, $end); // echo "\r\n" . $memPeak . "\r\n"; $this->assertLessThan(238, explode(" ", $memPeak)[0]); }
/** * @covers think\Debug::getMemPeak * @todo Implement testGetMemPeak(). */ public function testGetMemPeak() { $start = "testGetMemPeakStart"; $end = "testGetMemPeakEnd"; Debug::remark($start); $str = ""; for ($i = 0; $i < 100000; $i++) { $str .= "mem"; } $memPeak = Debug::getMemPeak($start, $end); $this->assertLessThan(400, explode(" ", $memPeak)[0]); }