/** * Testing the toArray method */ public function testToArray() { $array = $this->getDummyHmacData(); $this->assertFalse($this->entity->toArray()); $this->entity->setData($array['data']); $this->entity->setHmac($array['hmac']); $this->entity->setTime($array['time']); unset($array['key']); $this->assertSame($array, $this->entity->toArray()); }
/** * Sets the time in the item * * @param int $time * @return Manager */ public function time($time) { $this->entity->setTime($time); return $this; }