Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CreateIntegrationWithDuplicatedNameTest.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Integration\Test\Fixture\Integration;
10 use Magento\Integration\Test\Page\Adminhtml\IntegrationIndex;
11 use Magento\Integration\Test\Page\Adminhtml\IntegrationNew;
12 use Magento\Mtf\TestCase\Injectable;
13 
30 {
31  /* tags */
32  const MVP = 'yes';
33  /* end tags */
34 
41 
48 
56  public function __inject(
57  IntegrationIndex $integrationIndex,
58  IntegrationNew $integrationNew
59  ) {
60  $this->integrationIndexPage = $integrationIndex;
61  $this->integrationNewPage = $integrationNew;
62  }
63 
70  public function test(Integration $integration)
71  {
72  // Precondition
73  $integration->persist();
74 
75  // Steps
76  $this->integrationIndexPage->open();
77  $this->integrationIndexPage->getGridPageActions()->addNew();
78  $this->integrationNewPage->getIntegrationForm()->fill($integration);
79  $this->integrationNewPage->getFormPageActions()->saveNew();
80  return ['integration' => $integration];
81  }
82 }
__inject(IntegrationIndex $integrationIndex, IntegrationNew $integrationNew)