Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertUrlRewritesCategoriesInGrid.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Constraint\AbstractConstraint;
10 use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex;
12 
16 class AssertUrlRewritesCategoriesInGrid extends AbstractConstraint
17 {
29  public function processAssert(
30  AssertUrlRewriteCategoryInGrid $assertUrlRewriteCategoryInGrid,
31  WebapiDecorator $webApi,
32  UrlRewriteIndex $urlRewriteIndex,
33  array $categories,
34  $filterByPath = 'target_path',
35  $redirectType = 'Permanent (301)'
36  ) {
37  foreach ($categories as $key => $category) {
38  $assertUrlRewriteCategoryInGrid->processAssert(
39  $category,
40  $webApi,
41  $urlRewriteIndex,
42  null,
43  null,
44  $key,
45  $filterByPath,
46  $redirectType
47  );
48  }
49  }
50 
56  public function toString()
57  {
58  return 'Category url rewrites are present in grid.';
59  }
60 }
processAssert(Category $category, WebapiDecorator $webApi, UrlRewriteIndex $urlRewriteIndex, Category $parentCategory=null, Category $childCategory=null, $nestingLevel=null, $filterByPath='target_path', $redirectType='Permanent(301)')
$categories
processAssert(AssertUrlRewriteCategoryInGrid $assertUrlRewriteCategoryInGrid, WebapiDecorator $webApi, UrlRewriteIndex $urlRewriteIndex, array $categories, $filterByPath='target_path', $redirectType='Permanent(301)')