ProductStreamEntity example

public function testGetDecoratedShouldThrowException(): void
    {
        static::expectException(DecorationPatternException::class);
        $this->searchIndexer->getDecorated();
    }

    public function testGlobalData(): void
    {
        $context = Context::createDefaultContext();
        $repository = $this->createMock(EntityRepository::class);
        $productStream = new ProductStreamEntity();
        $productStream->setUniqueIdentifier(Uuid::randomHex());
        $repository->method('search')->willReturn(
            new EntitySearchResult(
                'product_stream',
                1,
                new EntityCollection([$productStream]),
                null,
                new Criteria(),
                $context
            )
        );

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