Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertMenuItemNotVisible.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Backend\Test\Page\Adminhtml\Dashboard;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertMenuItemNotVisible extends AbstractConstraint
16 {
24  public function processAssert(Dashboard $dashboard, $menuItem)
25  {
26  $dashboard->open();
27 
28  \PHPUnit\Framework\Assert::assertFalse(
29  $dashboard->getMenuBlock()->isMenuItemVisible($menuItem),
30  'Menu item ' . $menuItem . ' is supposed to be not visible.'
31  );
32  }
33 
39  public function toString()
40  {
41  return 'Menu item is not visible in dashboard menu.';
42  }
43 }