Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertGridSorting.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Constraint\AbstractConstraint;
10 
15 class AssertGridSorting extends AbstractConstraint
16 {
22  public function processAssert(array $sortingResults)
23  {
24  foreach ($sortingResults as $columnName => $sortingResult) {
25  \PHPUnit\Framework\Assert::assertNotEquals(
26  $sortingResult['firstIdAfterFirstSoring'],
27  $sortingResult['firstIdAfterSecondSoring'],
28  sprintf('Sorting for "%s" column have not changed the first item of grid!', $columnName)
29  );
30  }
31  }
32 
38  public function toString()
39  {
40  return 'Sorting have not changed the first item of grid!';
41  }
42 }