/** * {@inheritdoc} */ public function dispatch(\Magento\Framework\App\RequestInterface $request) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'dispatch'); if (!$pluginInfo) { return parent::dispatch($request); } else { return $this->___callPlugins('dispatch', func_get_args(), $pluginInfo); } }
public function testSetCmsPageData() { $extendedPageData = ['page_id' => '2', 'title' => 'Home Page', 'page_layout' => '1column', 'identifier' => 'home', 'content_heading' => 'Home Page', 'content' => 'CMS homepage content goes here.', 'is_active' => '1', 'sort_order' => '1', 'custom_theme' => '3', 'store_id' => ['0']]; $pageData = ['page_id' => '2', 'title' => 'Home Page', 'page_layout' => '1column', 'identifier' => 'home', 'is_active' => '1', 'custom_theme' => '3']; $getData = ['page_id' => '2', 'title' => 'Home Page', 'page_layout' => '1column', 'identifier' => 'home', 'content_heading' => 'Home Page', 'content' => 'CMS homepage content goes here.', 'is_active' => '1', 'sort_order' => '1', 'custom_theme' => '3', 'custom_root_template' => '1column', 'store_id' => ['0']]; $mergedData = ['page_id' => '2', 'title' => 'Home Page', 'page_layout' => '1column', 'identifier' => 'home', 'content_heading' => 'Home Page', 'content' => 'CMS homepage content goes here.', 'is_active' => '1', 'sort_order' => '1', 'custom_theme' => '3', 'custom_root_template' => '1column', 'store_id' => ['0']]; $this->cmsPage->expects($this->once())->method('getData')->willReturn($getData); $this->cmsPage->expects($this->once())->method('setData')->with($mergedData)->willReturnSelf(); $this->assertSame($this->controller, $this->controller->setCmsPageData($this->cmsPage, $extendedPageData, $pageData)); }