Skip to content
This repository has been archived by the owner on Apr 29, 2019. It is now read-only.

Commit

Permalink
Extracted websiteString property to local variable
Browse files Browse the repository at this point in the history
  • Loading branch information
maxalmonte14 committed Oct 30, 2018
1 parent 06a47b5 commit e32808b
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ class WebsiteTest extends \PHPUnit\Framework\TestCase
*/
protected $website;

/**
* @var \Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing\Validator\Website|\PHPUnit_Framework_MockObject_MockObject
*/
protected $websiteString;

protected function setUp()
{
$this->webSiteModel = $this->getMockBuilder(\Magento\Store\Model\Website::class)
Expand Down Expand Up @@ -108,13 +103,13 @@ public function testGetAllWebsitesValue()
$this->webSiteModel->expects($this->once())->method('getBaseCurrency')->willReturn($currency);

$expectedResult = AdvancedPricing::VALUE_ALL_WEBSITES . ' [' . $currencyCode . ']';
$this->websiteString = $this->getMockBuilder(
$websiteString = $this->getMockBuilder(
\Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing\Validator\Website::class
)
->setMethods(['_clearMessages', '_addMessages'])
->setConstructorArgs([$this->storeResolver, $this->webSiteModel])
->getMock();
$result = $this->websiteString->getAllWebsitesValue();
$result = $websiteString->getAllWebsitesValue();

$this->assertEquals($expectedResult, $result);
}
Expand Down

0 comments on commit e32808b

Please sign in to comment.