diff --git a/tests/Zval/Representation/MicrotimeRepresentationTest.php b/tests/Zval/Representation/MicrotimeRepresentationTest.php index b99c39142..74d603e45 100644 --- a/tests/Zval/Representation/MicrotimeRepresentationTest.php +++ b/tests/Zval/Representation/MicrotimeRepresentationTest.php @@ -42,9 +42,6 @@ public function testConstruct() { $r = new MicrotimeRepresentation(123, 456, 7, 8, 100); - $mem = \memory_get_usage(); - $mem_peak = \memory_get_peak_usage(); - $this->assertSame(123, $r->seconds); $this->assertSame(456, $r->microseconds); $this->assertSame(7, $r->group); @@ -58,8 +55,8 @@ public function testConstruct() $this->assertSame(20.0, $r->avg); // Memory usage isn't going to be identical after making the representation - $this->assertLessThan(512, \abs($mem - $r->mem)); - $this->assertSame($mem_peak, $r->mem_peak); + $this->assertLessThan(1024, abs(\memory_get_usage() - $r->mem)); + $this->assertSame(\memory_get_peak_usage(), $r->mem_peak); } /**