11 use Magento\Store\Model\WebsiteFactory;
30 public function setUp()
34 $this->websiteFactory = $this->getMockBuilder(\
Magento\
Store\Model\WebsiteFactory::class)
35 ->disableOriginalConstructor()
36 ->setMethods([
'create',
'getCollection',
'__wakeup'])
40 $this->model = $this->objectManagerHelper->getObject(
42 [
'websiteFactory' => $this->websiteFactory]
48 $websiteCollection = $this->createPartialMock(
52 $websiteCollection->expects($this->any())->method(
'getSize')->will($this->returnValue(2));
54 $this->websiteFactory->expects($this->any())
56 ->willReturn($this->websiteFactory);
57 $this->websiteFactory->expects($this->any())
58 ->method(
'getCollection')
59 ->willReturn($websiteCollection);
61 $this->model->setId(2);
62 $this->assertTrue($this->model->isCanDelete());
72 $this->assertEquals(
'Website', $this->model->getScopeTypeName());