本文整理汇总了PHP中Aimeos\MShop\Customer\Manager\Factory::injectManager方法的典型用法代码示例。如果您正苦于以下问题:PHP Factory::injectManager方法的具体用法?PHP Factory::injectManager怎么用?PHP Factory::injectManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aimeos\MShop\Customer\Manager\Factory
的用法示例。
在下文中一共展示了Factory::injectManager方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testProcessDeleteItem
public function testProcessDeleteItem()
{
$this->context->setUserId('123');
$view = $this->object->getView();
$param = array('wat_action' => 'delete', 'wat_id' => 321);
$helper = new \Aimeos\MW\View\Helper\Param\Standard($view, $param);
$view->addHelper('param', $helper);
$listManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Customer\\Manager\\Lists\\Standard')->setMethods(array('deleteItems'))->setConstructorArgs(array($this->context))->getMock();
$managerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Customer\\Manager\\Standard')->setMethods(array('getSubManager'))->setConstructorArgs(array($this->context))->getMock();
$name = 'ClientHtmlAccountWatchDefaultProcess';
$this->context->getConfig()->set('mshop/customer/manager/name', $name);
\Aimeos\MShop\Customer\Manager\Factory::injectManager('\\Aimeos\\MShop\\Customer\\Manager\\' . $name, $managerStub);
$managerStub->expects($this->atLeastOnce())->method('getSubManager')->will($this->returnValue($listManagerStub));
$listManagerStub->expects($this->once())->method('deleteItems');
$this->object->process();
}