本文整理汇总了PHP中TestHelper::getView方法的典型用法代码示例。如果您正苦于以下问题:PHP TestHelper::getView方法的具体用法?PHP TestHelper::getView怎么用?PHP TestHelper::getView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestHelper
的用法示例。
在下文中一共展示了TestHelper::getView方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
*/
protected function setUp()
{
$this->context = clone \TestHelper::getContext();
$paths = \TestHelper::getHtmlTemplatePaths();
$this->object = new \Aimeos\Client\Html\Checkout\Confirm\Order\Standard($this->context, $paths);
$this->object->setView(\TestHelper::getView());
}
示例2: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
*/
protected function setUp()
{
$this->context = \TestHelper::getContext();
$paths = \TestHelper::getHtmlTemplatePaths();
$this->object = new \Aimeos\Client\Html\Checkout\Standard\Summary\Option\Terms\Standard($this->context, $paths);
$this->object->setView(\TestHelper::getView());
}
示例3: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
*/
protected function setUp()
{
$this->_context = TestHelper::getContext();
$paths = TestHelper::getHtmlTemplatePaths();
$this->_object = new Client_Html_Basket_Mini_Default($this->_context, $paths);
$this->_object->setView(TestHelper::getView());
}
示例4: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
*/
protected function setUp()
{
$context = \TestHelper::getContext();
$paths = \TestHelper::getHtmlTemplatePaths();
$this->object = new \Aimeos\Client\Html\Catalog\Lists\Items\Standard($context, $paths);
$catalogManager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($context);
$search = $catalogManager->createSearch();
$search->setConditions($search->compare('==', 'catalog.code', 'cafe'));
$catItems = $catalogManager->searchItems($search);
if (($catItem = reset($catItems)) === false) {
throw new \Exception('No catalog item found');
}
$productManager = \Aimeos\MShop\Product\Manager\Factory::createManager($context);
$search = $productManager->createSearch();
$search->setConditions($search->compare('==', 'product.code', array('CNC', 'CNE')));
$total = 0;
$view = \TestHelper::getView();
$view->listProductItems = $productManager->searchItems($search, array('media', 'price', 'text'), $total);
$view->listProductTotal = $total;
$view->listPageSize = 100;
$view->listPageCurr = 1;
$view->listParams = array();
$view->listCatPath = array($catalogManager->createItem(), $catItem);
$this->object->setView($view);
}
示例5: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
*/
protected function setUp()
{
$this->context = clone \TestHelper::getContext();
$paths = \TestHelper::getHtmlTemplatePaths();
$this->object = new \Aimeos\Client\Html\Account\History\Lists\Standard($this->context, $paths);
$this->object->setView(\TestHelper::getView());
}
示例6: testGetBodyNoCatId
public function testGetBodyNoCatId()
{
$this->object->setView(\TestHelper::getView());
$output = $this->object->getBody();
$this->assertRegExp('#Your search result#smU', $output);
$this->assertStringStartsWith('<div class="catalog-stage-breadcrumb">', $output);
}
示例7: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
*/
protected function setUp()
{
$context = TestHelper::getContext();
$paths = TestHelper::getHtmlTemplatePaths();
$this->_object = new Client_Html_Catalog_List_Items_Default($context, $paths);
$catalogManager = MShop_Catalog_Manager_Factory::createManager($context);
$search = $catalogManager->createSearch();
$search->setConditions($search->compare('==', 'catalog.code', 'cafe'));
$catItems = $catalogManager->searchItems($search);
if (($catItem = reset($catItems)) === false) {
throw new Exception('No catalog item found');
}
$productManager = MShop_Product_Manager_Factory::createManager($context);
$search = $productManager->createSearch();
$search->setConditions($search->compare('==', 'product.code', array('CNC', 'CNE')));
$total = 0;
$view = TestHelper::getView();
$view->listProductItems = $productManager->searchItems($search, array('media', 'price', 'text'), $total);
$view->listProductTotal = $total;
$view->listPageSize = 100;
$view->listPageCurr = 1;
$view->listParams = array();
$view->listCatPath = array($catalogManager->createItem(), $catItem);
$this->_object->setView($view);
}
示例8: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
*/
protected function setUp()
{
$context = TestHelper::getContext();
$paths = TestHelper::getHtmlTemplatePaths();
$this->_object = new Client_Html_Catalog_Stage_Navigator_Default($context, $paths);
$this->_object->setView(TestHelper::getView());
}
示例9: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
*/
protected function setUp()
{
$this->_context = clone TestHelper::getContext();
$paths = TestHelper::getHtmlTemplatePaths();
$this->_object = new Client_Html_Checkout_Confirm_Order_Default($this->_context, $paths);
$this->_object->setView(TestHelper::getView());
}
示例10: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
*/
protected function setUp()
{
$this->context = \TestHelper::getContext();
$paths = \TestHelper::getHtmlTemplatePaths();
$this->object = new \Aimeos\Client\Html\Basket\Related\Standard($this->context, $paths);
$this->object->setView(\TestHelper::getView());
}
示例11: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
*/
protected function setUp()
{
$this->_context = clone TestHelper::getContext();
$paths = TestHelper::getHtmlTemplatePaths();
$this->_object = new Client_Html_Account_History_Detail_Default($this->_context, $paths);
$this->_object->setView(TestHelper::getView());
}
示例12: testProcess
public function testProcess()
{
$type = MShop_Order_Item_Base_Address_Abstract::TYPE_DELIVERY;
$manager = MShop_Customer_Manager_Factory::createManager($this->_context);
$addrManager = $manager->getSubManager('address');
$search = $manager->createSearch();
$search->setSlice(0, 1);
$result = $manager->searchItems($search);
if (($customerItem = reset($result)) === false) {
throw new Exception('No customer item found');
}
$addrItem = $customerItem->getPaymentAddress();
$addrItem->setId(null);
$basketCntl = Controller_Frontend_Basket_Factory::createController($this->_context);
$basketCntl->setAddress($type, $addrItem);
$view = TestHelper::getView();
$view->orderBasket = $basketCntl->get();
$view->orderBasket->setCustomerId($customerItem->getId());
$this->_object->setView($view);
$this->_object->process();
$orderAddress = $view->orderBasket->getAddress($type);
$actual = $addrManager->getItem($orderAddress->getAddressId());
$addrManager->deleteItem($actual->getId());
$this->assertEquals($addrItem->getFirstname(), $actual->getFirstname());
$this->assertEquals($addrItem->getLastname(), $actual->getLastname());
$this->assertEquals($addrItem->getPostal(), $actual->getPostal());
$this->assertEquals($addrItem->getTelephone(), $actual->getTelephone());
$this->assertEquals($addrItem->getTelefax(), $actual->getTelefax());
}
示例13: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
*/
protected function setUp()
{
$this->_context = TestHelper::getContext();
$paths = TestHelper::getHtmlTemplatePaths();
$this->_object = new Client_Html_Catalog_List_Simple($this->_context, $paths);
$this->_object->setView(TestHelper::getView());
}
示例14: testProcess
public function testProcess()
{
$type = \Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT;
$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager($this->context);
$search = $manager->createSearch();
$search->setSlice(0, 1);
$result = $manager->searchItems($search);
if (($customerItem = reset($result)) === false) {
throw new \Exception('No customer item found');
}
$addrItem = $customerItem->getPaymentAddress();
$addrItem->setEmail('unittest@aimeos.org');
$mailStub = $this->getMockBuilder('\\Aimeos\\MW\\Mail\\None')->disableOriginalConstructor()->getMock();
$mailMsgStub = $this->getMockBuilder('\\Aimeos\\MW\\Mail\\Message\\None')->disableOriginalConstructor()->disableOriginalClone()->getMock();
$mailStub->expects($this->once())->method('createMessage')->will($this->returnValue($mailMsgStub));
$mailStub->expects($this->once())->method('send');
$this->context->setMail($mailStub);
$basketCntl = \Aimeos\Controller\Frontend\Basket\Factory::createController($this->context);
$basketCntl->setAddress($type, $addrItem);
$view = \TestHelper::getView();
$view->orderBasket = $basketCntl->get();
$this->context->setView($view);
$this->object->setView($view);
$orderBaseStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Base\\Standard')->setConstructorArgs(array($this->context))->setMethods(array('saveItem'))->getMock();
$customerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Customer\\Manager\\Standard')->setConstructorArgs(array($this->context))->setMethods(array('saveItem'))->getMock();
$orderBaseStub->expects($this->once())->method('saveItem');
$customerStub->expects($this->once())->method('saveItem');
\Aimeos\MShop\Factory::injectManager($this->context, 'customer', $customerStub);
\Aimeos\MShop\Factory::injectManager($this->context, 'order/base', $orderBaseStub);
$this->object->process();
}
示例15: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
*/
protected function setUp()
{
$this->_context = TestHelper::getContext();
$paths = TestHelper::getHtmlTemplatePaths();
$this->_object = new Client_Html_Catalog_Session_Pinned_Default($this->_context, $paths);
$this->_object->setView(TestHelper::getView());
}