| @@ 9-41 (lines=33) @@ | ||
| 6 | /** |
|
| 7 | * Defines application features from the specific context. |
|
| 8 | */ |
|
| 9 | class AttributeFeatureContext implements Context |
|
| 10 | { |
|
| 11 | ||
| 12 | /** |
|
| 13 | * @var \ConsoleContext |
|
| 14 | */ |
|
| 15 | private $consoleContext; |
|
| 16 | ||
| 17 | /** @BeforeScenario */ |
|
| 18 | public function before(BeforeScenarioScope $scope) |
|
| 19 | { |
|
| 20 | ||
| 21 | /** @var Behat\Behat\Context\Environment\InitializedContextEnvironment $environment */ |
|
| 22 | $environment = $scope->getEnvironment(); |
|
| 23 | ||
| 24 | $this->consoleContext = $environment->getContext(ConsoleContext::class); |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * @Given attributes have been imported |
|
| 29 | */ |
|
| 30 | public function attributesHaveBeenImported() |
|
| 31 | { |
|
| 32 | ||
| 33 | $this->consoleContext->aThirdPartySystemHasCopiedTheFileIntoTheImportFolder( |
|
| 34 | 'vendor/techdivision/import-sample-data/generic/data/attributes/add-update/attribute-import_20170428-124902_01.csv', |
|
| 35 | 'var/importexport' |
|
| 36 | ); |
|
| 37 | ||
| 38 | $this->consoleContext->theCommandHasBeenExecuted('bin/import-simple import:create:ok-file'); |
|
| 39 | $this->consoleContext->theCommandHasBeenExecuted('bin/import-simple import:attributes'); |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 9-41 (lines=33) @@ | ||
| 6 | /** |
|
| 7 | * Defines application features from the specific context. |
|
| 8 | */ |
|
| 9 | class AttributeSetFeatureContext implements Context |
|
| 10 | { |
|
| 11 | ||
| 12 | /** |
|
| 13 | * @var \ConsoleContext |
|
| 14 | */ |
|
| 15 | private $consoleContext; |
|
| 16 | ||
| 17 | /** @BeforeScenario */ |
|
| 18 | public function before(BeforeScenarioScope $scope) |
|
| 19 | { |
|
| 20 | ||
| 21 | /** @var Behat\Behat\Context\Environment\InitializedContextEnvironment $environment */ |
|
| 22 | $environment = $scope->getEnvironment(); |
|
| 23 | ||
| 24 | $this->consoleContext = $environment->getContext(ConsoleContext::class); |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * @Given attribute sets have been imported |
|
| 29 | */ |
|
| 30 | public function attributeSetsHaveBeenImported() |
|
| 31 | { |
|
| 32 | ||
| 33 | $this->consoleContext->aThirdPartySystemHasCopiedTheFileIntoTheImportFolder( |
|
| 34 | 'vendor/techdivision/import-sample-data/generic/data/attributes-set/add-update/attribute-set-import_20190104-114000_01.csv', |
|
| 35 | 'var/importexport' |
|
| 36 | ); |
|
| 37 | ||
| 38 | $this->consoleContext->theCommandHasBeenExecuted('bin/import-simple import:create:ok-file'); |
|
| 39 | $this->consoleContext->theCommandHasBeenExecuted('bin/import-simple import:attributes:set'); |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 9-41 (lines=33) @@ | ||
| 6 | /** |
|
| 7 | * Defines application features from the specific context. |
|
| 8 | */ |
|
| 9 | class CategoryFeatureContext implements Context |
|
| 10 | { |
|
| 11 | ||
| 12 | /** |
|
| 13 | * @var \ConsoleContext |
|
| 14 | */ |
|
| 15 | private $consoleContext; |
|
| 16 | ||
| 17 | /** @BeforeScenario */ |
|
| 18 | public function before(BeforeScenarioScope $scope) |
|
| 19 | { |
|
| 20 | ||
| 21 | /** @var Behat\Behat\Context\Environment\InitializedContextEnvironment $environment */ |
|
| 22 | $environment = $scope->getEnvironment(); |
|
| 23 | ||
| 24 | $this->consoleContext = $environment->getContext(ConsoleContext::class); |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * @Given categories have been imported |
|
| 29 | */ |
|
| 30 | public function categoriesHaveBeenImported() |
|
| 31 | { |
|
| 32 | ||
| 33 | $this->consoleContext->aThirdPartySystemHasCopiedTheFileIntoTheImportFolder( |
|
| 34 | 'vendor/techdivision/import-sample-data/generic/data/categories/add-update/category-import_20161024-194026_01.csv', |
|
| 35 | 'var/importexport' |
|
| 36 | ); |
|
| 37 | ||
| 38 | $this->consoleContext->theCommandHasBeenExecuted('bin/import-simple import:create:ok-file'); |
|
| 39 | $this->consoleContext->theCommandHasBeenExecuted('bin/import-simple import:categories'); |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||