public function setMicrotime($timestamp) { if (empty($timestamp)) { throw new \InvalidArgumentException("Timestamp should not be empty"); } $this->timestamp = $timestamp; }
/** * Tests setMicrotime(). * * @test */ public function testSetMicrotime() { $function = new FixedMicrotimeFunction(); $function->setMicrotime("0.00000001 1"); $this->assertEquals("0.00000001 1", $function->getMicrotime()); }