Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertAttributeSetSuccessDeleteMessage.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
16 class AssertAttributeSetSuccessDeleteMessage extends AbstractConstraint
17 {
21  const SUCCESS_DELETE_MESSAGE = 'The attribute set has been removed.';
22 
29  public function processAssert(CatalogProductSetIndex $productSetIndex)
30  {
31  $actualMessage = $productSetIndex->getMessagesBlock()->getSuccessMessage();
32  \PHPUnit\Framework\Assert::assertEquals(
33  self::SUCCESS_DELETE_MESSAGE,
34  $actualMessage,
35  'Wrong success message is displayed.'
36  . "\nExpected: " . self::SUCCESS_DELETE_MESSAGE
37  . "\nActual: " . $actualMessage
38  );
39  }
40 
46  public function toString()
47  {
48  return 'Attribute Sets success delete message is present.';
49  }
50 }