/** * 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 data in the item * * @param string $data * @return Manager */ public function data($data) { $this->entity->setData($data); return $this; }