ProductBoxCmsElementResolver example


class ProductBoxCmsElementResolverTest extends TestCase
{
    private ProductBoxCmsElementResolver $boxCmsElementResolver;

    private MockObject&SystemConfigService $systemConfig;

    protected function setUp(): void
    {
        $this->systemConfig = $this->createMock(SystemConfigService::class);

        $this->boxCmsElementResolver = new ProductBoxCmsElementResolver($this->systemConfig);
    }

    public function testGetType(): void
    {
        static::assertSame('product-box', $this->boxCmsElementResolver->getType());
    }

    public function testCollectWithEmptyConfig(): void
    {
        $resolverContext = new ResolverContext($this->createMock(SalesChannelContext::class)new Request());

        

class ProductBoxTypeDataResolverTest extends TestCase
{
    private ProductBoxCmsElementResolver $productBoxResolver;

    private MockObject&SystemConfigService $systemConfig;

    protected function setUp(): void
    {
        $this->systemConfig = $this->createMock(SystemConfigService::class);
        $this->productBoxResolver = new ProductBoxCmsElementResolver($this->systemConfig);
    }

    public function testType(): void
    {
        static::assertSame('product-box', $this->productBoxResolver->getType());
    }

    public function testCollectWithEmptyConfig(): void
    {
        $resolverContext = new ResolverContext($this->createMock(SalesChannelContext::class)new Request());

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