Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CreateTaxRuleEntityTest.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex;
11 use Magento\Tax\Test\Page\Adminhtml\TaxRuleNew;
12 use Magento\Mtf\TestCase\Injectable;
13 
26 class CreateTaxRuleEntityTest extends Injectable
27 {
28  /* tags */
29  const MVP = 'yes';
30  const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
31  const TO_MAINTAIN = 'yes';
32  /* end tags */
33 
39  protected $taxRuleIndexPage;
40 
46  protected $taxRuleNewPage;
47 
55  public function __inject(
56  TaxRuleIndex $taxRuleIndexPage,
57  TaxRuleNew $taxRuleNewPage
58  ) {
59  $this->taxRuleIndexPage = $taxRuleIndexPage;
60  $this->taxRuleNewPage = $taxRuleNewPage;
61  }
62 
69  public function testCreateTaxRule(TaxRule $taxRule)
70  {
71  // Steps
72  $this->taxRuleIndexPage->open();
73  $this->taxRuleIndexPage->getGridPageActions()->addNew();
74  $this->taxRuleNewPage->getTaxRuleForm()->fill($taxRule);
75  $this->taxRuleNewPage->getFormPageActions()->save();
76  }
77 
83  public function tearDown()
84  {
85  $this->objectManager->create(\Magento\Tax\Test\TestStep\DeleteAllTaxRulesStep::class, [])->run();
86  }
87 }
$taxRule
Definition: tax_rule.php:35
__inject(TaxRuleIndex $taxRuleIndexPage, TaxRuleNew $taxRuleNewPage)