Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCategoryAbsenceOnBackend.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertCategoryAbsenceOnBackend extends AbstractConstraint
17 {
25  public function processAssert(CatalogCategoryIndex $catalogCategoryIndex, Category $category)
26  {
27  $catalogCategoryIndex->open();
28  \PHPUnit\Framework\Assert::assertFalse(
29  $catalogCategoryIndex->getTreeCategories()->isCategoryVisible($category),
30  'Category is displayed in backend catalog category tree.'
31  );
32  }
33 
39  public function toString()
40  {
41  return 'Category not displayed in backend catalog category tree.';
42  }
43 }
processAssert(CatalogCategoryIndex $catalogCategoryIndex, Category $category)