public function testCreateFromXmlWithFlowAction(): void
{ $flowActionsFile = Feature::
isActive('v6.6.0.0'
) ? '/_fixtures/valid/major/flow.xml' : '/_fixtures/valid/minor/flow-action.xml';
$flowActions = Action::
createFromXmlFile(__DIR__ .
$flowActionsFile);
if (Feature::
isActive('v6.6.0.0'
)) { static::
assertEquals(__DIR__ . '/_fixtures/valid/major',
$flowActions->
getPath());
} else { static::
assertEquals(__DIR__ . '/_fixtures/valid/minor',
$flowActions->
getPath());
} static::
assertNotNull($flowActions->
getActions());
static::
assertCount(1,
$flowActions->
getActions()->
getActions());
} public function testCreateFromXmlMissingFlowAction(): void
{ static::
expectException(XmlParsingException::
class);
static::
expectExceptionMessage('[ERROR 1871] Element \'flow-actions\': Missing child element(s). Expected is ( flow-action ).'
);
$flowActionsFile = Feature::
isActive('v6.6.0.0'
) ? '/_fixtures/invalid/FlowActionsWithoutFlowActionMajor/flow.xml' : '/_fixtures/invalid/FlowActionsWithoutFlowAction/flow-action.xml';
Action::
createFromXmlFile(__DIR__ .
$flowActionsFile);
}