magento-engcom / import-export-improvements

Open Software License 3.0
31 stars 29 forks source link

Added $websiteString property to test class #142

Closed maxalmonte14 closed 5 years ago

maxalmonte14 commented 5 years ago

Description (*)

This PR solves the problem addressed in https://github.com/magento-engcom/import-export-improvements/issues/132

Fixed Issues (if relevant)

  1. https://github.com/magento-engcom/import-export-improvements/issues/132: Clean up app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php

Manual testing scenarios (*)

  1. Run ./vendor/bin/phpstan analyse app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.phpas described in https://github.com/magento-engcom/import-export-improvements/issues/132, after this implementation the following error shouldn't be present
------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   WebsiteTest.php                                                                                                                                                                     
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  106    Access to an undefined property Magento\AdvancedPricingImportExport\Test\Unit\Model\Import\AdvancedPricing\Validator\WebsiteTest::$websiteString.                                   
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Contribution checklist (*)

dmanners commented 5 years ago

Hello, thank you for your pull request. I will start to process this PR and get back to you if I need any more information.

maxalmonte14 commented 5 years ago

I extracted the $websiteString to a local variable inside the testGetAllWebsitesValue method, also I made sure the test is passing by running ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php 👍