assertScriptConditionFieldConfig example

static::assertEquals('withRuleConditions', $appEntity->getName());
        /** @var AppScriptConditionCollection $scriptCollection */
        $scriptCollection = $appEntity->getScriptConditions();
        static::assertCount(14, $scriptCollection);

        /** @var AppScriptConditionEntity $scriptCondition */
        foreach ($scriptCollection as $scriptCondition) {
            static::assertStringContainsString('app\withRuleConditions_', $scriptCondition->getIdentifier());
            static::assertStringContainsString('{% return true %}', (string) $scriptCondition->getScript());
            static::assertIsArray($scriptCondition->getConfig());

            $this->assertScriptConditionFieldConfig($scriptCondition);
        }

        $manifest = Manifest::createFromXmlFile(__DIR__ . '/_fixtures/withRuleConditionsUpdated/manifest.xml');
        $this->appLifecycle->update($manifest['id' => $appEntity->getId(), 'roleId' => Uuid::randomHex()]$this->context);

        /** @var AppCollection $apps */
        $apps = $this->appRepository->search($criteria$this->context)->getEntities();
        /** @var AppEntity $appEntity */
        $appEntity = $apps->first();
        static::assertNotNull($appEntity);

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