6 declare(strict_types=1);
13 use Magento\Store\Model\WebsiteFactory;
15 use PHPUnit\Framework\TestCase;
22 private $websiteFactory;
27 private $getAssignedStockIdForWebsite;
32 private $websiteResource;
38 GetAssignedStockIdForWebsiteInterface::class
47 public function testRenameWebsiteToStockLink()
49 $oldWebsiteCode =
'old_website_code';
50 $newWebsiteCode =
'new_website_code';
53 $website = $this->websiteFactory->create();
55 $this->websiteResource->save(
$website);
58 $website = $this->websiteFactory->create();
61 $this->websiteResource->save(
$website);
64 $this->getAssignedStockIdForWebsite->execute($oldWebsiteCode),
65 'Old website link was not removed' 69 $this->getAssignedStockIdForWebsite->execute($newWebsiteCode),
70 'Website link was not renamed'
static getObjectManager()