本文整理汇总了PHP中Magento\Store\Model\Website::isCanDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP Website::isCanDelete方法的具体用法?PHP Website::isCanDelete怎么用?PHP Website::isCanDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Store\Model\Website
的用法示例。
在下文中一共展示了Website::isCanDelete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testIsCanDelete
public function testIsCanDelete()
{
$websiteCollection = $this->getMock('Magento\\Store\\Model\\ResourceModel\\Website\\Collection', ['getSize'], [], '', false);
$websiteCollection->expects($this->any())->method('getSize')->will($this->returnValue(2));
$this->websiteFactory->expects($this->any())->method('create')->willReturn($this->websiteFactory);
$this->websiteFactory->expects($this->any())->method('getCollection')->willReturn($websiteCollection);
$this->model->setId(2);
$this->assertTrue($this->model->isCanDelete());
}
示例2: isCanDelete
/**
* {@inheritdoc}
*/
public function isCanDelete()
{
$pluginInfo = $this->pluginList->getNext($this->subjectType, 'isCanDelete');
if (!$pluginInfo) {
return parent::isCanDelete();
} else {
return $this->___callPlugins('isCanDelete', func_get_args(), $pluginInfo);
}
}
示例3: testIsCanDelete
public function testIsCanDelete()
{
$this->assertFalse($this->_model->isCanDelete());
$this->_model->isReadOnly(true);
$this->assertFalse($this->_model->isCanDelete());
}