/** * Assert that custom system variable not in cms page form. * * @param CmsPageNew $cmsPageNew * @param SystemVariable $systemVariable * @return void */ public function processAssert(CmsPageNew $cmsPageNew, SystemVariable $systemVariable) { $customVariableName = $systemVariable->getName(); $cmsPageNew->open(); $cmsPageForm = $cmsPageNew->getPageForm(); $variables = $cmsPageForm->getSystemVariables(); \PHPUnit_Framework_Assert::assertFalse(in_array($customVariableName, $variables), 'Custom System Variable "' . $customVariableName . '" is present in Cms Page Form.'); }
/** * Delete Custom System Variable Entity test. * * @param SystemVariable $systemVariable * @return void */ public function test(SystemVariable $systemVariable) { // Precondition $systemVariable->persist(); // Steps $filter = ['code' => $systemVariable->getCode(), 'name' => $systemVariable->getName()]; $this->systemVariableIndexPage->open(); $this->systemVariableIndexPage->getSystemVariableGrid()->searchAndOpen($filter); $this->systemVariableNewPage->getFormPageActions()->delete(); }
/** * Assert Custom System Variable not available in System Variable grid * * @param SystemVariableIndex $systemVariableIndexNew * @param SystemVariable $systemVariable * @return void */ public function processAssert(SystemVariableIndex $systemVariableIndexNew, SystemVariable $systemVariable) { $filter = ['code' => $systemVariable->getCode(), 'name' => $systemVariable->getName()]; $systemVariableIndexNew->open(); \PHPUnit_Framework_Assert::assertFalse($systemVariableIndexNew->getSystemVariableGrid()->isRowVisible($filter), 'Custom System Variable with code \'' . $filter['code'] . '\' is present in System Variable grid.'); }