assertDefaultScriptConditions example

$criteria->addAssociation('paymentMethods.paymentMethod');
        $criteria->addAssociation('scripts');
        $criteria->addAssociation('scriptConditions');

        /** @var AppEntity|null $app */
        $app = $this->appRepository->search($criteria$this->context)->first();
        static::assertNotNull($app);
        static::assertSame($active$app->isActive());
        $this->assertDefaultTemplate($app);
        $this->assertDefaultPaymentMethods($app);
        $this->assertDefaultScripts($app);
        $this->assertDefaultScriptConditions($app);
    }

    private function assertDefaultTemplate(AppEntity $app): void
    {
        static::assertNotNull($app->getTemplates());
        $template = $app->getTemplates()->first();

        static::assertNotNull($template);
        static::assertSame($app->isActive()$template->isActive());
    }

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