Exemplo n.º 1
0
 /**
  * @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);
 }
Exemplo n.º 2
0
 /**
  * @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;
 }