onReviewDeleted example

new EntityExistence(ProductDefinition::ENTITY_NAME, ['id' => 'id'], true, false, false, []),
                    new ChangeSet(['customer_id' => 'customer_id'][], true)
                ),
            ],
            Context::createDefaultContext(),
        );

        $this->productReviewCountService->expects(static::once())
            ->method('updateReviewCountForCustomer')
            ->with('customer_id');

        $this->productReviewSubscriber->onReviewDeleted($event);
    }

    public function testCreateReviewWithInvalidEntityName(): void
    {
        $ids = [
            Uuid::randomHex(),
            Uuid::randomHex(),
        ];
        $this->productReviewCountService->expects(static::never())->method('updateReviewCount');
        $this->productReviewSubscriber->createReview($this->getEntityWrittenEvent($ids, true));
    }

    
Home | Imprint | This part of the site doesn't use cookies.