public function testSetItemModifiesItem() { $item = static::$item; $serialized = static::$serialized; $event = new ResourceSerializeEvent(new StringResource($item), $item); $event->setItem($serialized); $this->assertEquals(static::$serialized, $event->getItem()); $this->assertEquals(static::$serialized, $item); }
/** * Catches the raw xml for an item. * * @param ResourceSerializeEvent $e */ public function onResourcePreSerialize(ResourceSerializeEvent $e) { $this->rawData = $e->getItem(); }