assertTrue(preg_match($pattern, Utils::GUID()) === 1); $this->assertRegExp($pattern, Utils::GUID()); } public function testGetTime(){ // Check that the time is 1s bigger upon two successive calls to getTime $old_time = Utils::getTime(); sleep(1); $new_time = Utils::getTime(); $this->assertTrue($old_time +1 === $new_time, "Evaluating that $old_time +1 === $new_time"); } public function testGetMicroTime(){ $old_time = Utils::getMicroTime(); usleep(10); $new_time = Utils::getMicroTime(); $this->assertTrue($old_time < $new_time, "Evaluating that $old_time < $new_time"); } }