Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCategoryCannotBeDeleted.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryEdit;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertCategoryCannotBeDeleted extends AbstractConstraint
16 {
23  public function processAssert(CatalogCategoryEdit $catalogCategoryEdit)
24  {
25  \PHPUnit\Framework\Assert::assertEquals(
26  $catalogCategoryEdit->getFormPageActions()->checkDeleteButton(),
27  false,
28  'Delete button is available for the category.'
29  );
30  }
31 
37  public function toString()
38  {
39  return 'The category cannot be deleted.';
40  }
41 }