Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CreateSitemapEntityTest.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Sitemap\Test\Fixture\Sitemap;
10 use Magento\Sitemap\Test\Page\Adminhtml\SitemapIndex;
11 use Magento\Sitemap\Test\Page\Adminhtml\SitemapNew;
12 use Magento\Mtf\TestCase\Injectable;
13 
28 class CreateSitemapEntityTest extends Injectable
29 {
30  /* tags */
31  const MVP = 'yes';
32  const TEST_TYPE = 'extended_acceptance_test';
33  const SEVERITY = 'S1';
34  /* end tags */
35 
39  protected $sitemapIndex;
40 
44  protected $sitemapNew;
45 
50  public function __inject(
51  SitemapIndex $sitemapIndex,
52  SitemapNew $sitemapNew
53  ) {
54  $this->sitemapIndex = $sitemapIndex;
55  $this->sitemapNew = $sitemapNew;
56  }
57 
61  public function testCreateSitemap(Sitemap $sitemap)
62  {
63  // Steps
64  $this->sitemapIndex->open();
65  $this->sitemapIndex->getGridPageActions()->addNew();
66  $this->sitemapNew->getSitemapForm()->fill($sitemap);
67  $this->sitemapNew->getSitemapPageActions()->save();
68  }
69 }
__inject(SitemapIndex $sitemapIndex, SitemapNew $sitemapNew)