/** * 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()); }
/** * Returns the entity array or false if the hmac doesn't exist * * @return array */ public function toArray() { return $this->entity->toArray(); }