Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCustomVariableNotInGrid.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Variable\Test\Fixture\SystemVariable;
10 use Magento\Variable\Test\Page\Adminhtml\SystemVariableIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertCustomVariableNotInGrid extends AbstractConstraint
17 {
25  public function processAssert(
26  SystemVariableIndex $systemVariableIndexNew,
27  SystemVariable $systemVariable
28  ) {
29  $filter = [
30  'code' => $systemVariable->getCode(),
31  'name' => $systemVariable->getName(),
32  ];
33 
34  $systemVariableIndexNew->open();
35  \PHPUnit\Framework\Assert::assertFalse(
36  $systemVariableIndexNew->getSystemVariableGrid()->isRowVisible($filter),
37  'Custom System Variable with code \'' . $filter['code'] . '\' is present in System Variable grid.'
38  );
39  }
40 
46  public function toString()
47  {
48  return 'Custom System Variable is absent in grid.';
49  }
50 }
processAssert(SystemVariableIndex $systemVariableIndexNew, SystemVariable $systemVariable)