Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CreateNewsletterTemplateEntityTest.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Newsletter\Test\Fixture\Template;
10 use Magento\Newsletter\Test\Page\Adminhtml\TemplateIndex;
11 use Magento\Newsletter\Test\Page\Adminhtml\TemplateNewIndex;
12 use Magento\Mtf\TestCase\Injectable;
13 
28 class CreateNewsletterTemplateEntityTest extends Injectable
29 {
30  /* tags */
31  const MVP = 'yes';
32  /* end tags */
33 
39  protected $templateNewIndex;
40 
46  protected $templateIndex;
47 
54  public function __inject(
55  TemplateIndex $templateIndex,
56  TemplateNewIndex $templateNewIndex
57  ) {
58  $this->templateIndex = $templateIndex;
59  $this->templateNewIndex = $templateNewIndex;
60  }
61 
67  public function testCreateNewsletterTemplate(Template $template)
68  {
69  // Steps
70  $this->templateIndex->open();
71  $this->templateIndex->getGridPageActions()->addNew();
72  $this->templateNewIndex->getEditForm()->fill($template);
73  $this->templateNewIndex->getFormPageActions()->save();
74  }
75 }
$template
Definition: export.php:12
__inject(TemplateIndex $templateIndex, TemplateNewIndex $templateNewIndex)