/** * @return void */ public function testTouchDeletedInsertsSomething() { $touchEntityQuery = $this->touchQueryContainer->queryTouchListByItemType('ProductTranslationWhatever'); $touchCountBeforeTouch = $touchEntityQuery->count(); $this->touchFacade->touchDeleted('ProductTranslationWhatever', 3); $touchCountAfterTouch = $touchEntityQuery->count(); $this->assertTrue($touchCountAfterTouch > $touchCountBeforeTouch); }
/** * @param string $itemType * * @return \Generated\Shared\Transfer\TouchTransfer[] */ public function getItemsByType($itemType) { $entityList = $this->touchQueryContainer->queryTouchListByItemType($itemType)->find(); $items = []; foreach ($entityList as $entity) { $touchTransfer = (new TouchTransfer())->fromArray($entity->toArray()); $items[$entity->getIdTouch()] = $touchTransfer; } return $items; }