Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
AssertCustomVariableNotInCmsPageForm Class Reference
Inheritance diagram for AssertCustomVariableNotInCmsPageForm:

Public Member Functions

 processAssert (CmsPageNew $cmsPageNew, SystemVariable $systemVariable)
 
 toString ()
 

Detailed Description

Assert that custom system variable not in cms page form.

Definition at line 16 of file AssertCustomVariableNotInCmsPageForm.php.

Member Function Documentation

◆ processAssert()

processAssert ( CmsPageNew  $cmsPageNew,
SystemVariable  $systemVariable 
)

Assert that custom system variable not in cms page form.

Parameters
CmsPageNew$cmsPageNew
SystemVariable$systemVariable
Returns
void

Definition at line 25 of file AssertCustomVariableNotInCmsPageForm.php.

28  {
29  $customVariableName = $systemVariable->getName();
30  $cmsPageNew->open();
31  $cmsPageForm = $cmsPageNew->getPageForm();
32  $variables = $cmsPageForm->getSystemVariables();
33 
34  \PHPUnit\Framework\Assert::assertFalse(
35  in_array($customVariableName, $variables),
36  'Custom System Variable "' . $customVariableName . '" is present in Cms Page Form.'
37  );
38  }

◆ toString()

toString ( )

Returns a string representation of successful assertion.

Returns
string

Definition at line 45 of file AssertCustomVariableNotInCmsPageForm.php.

46  {
47  return "Custom System Variable is absent in Cms Page Form.";
48  }

The documentation for this class was generated from the following file: