Example #1
0
 public function testAroundExecute()
 {
     $subjectMock = $this->getMock('Magento\Framework\App\Action\Action', [], [], '', false);
     $designLoaderMock = $this->getMock('Magento\Framework\View\DesignLoader', [], [], '', false);
     $closureMock = function () {
         return 'Expected';
     };
     $requestMock = $this->getMock('Magento\Framework\App\RequestInterface');
     $plugin = new \Magento\Framework\App\Action\Plugin\Design($designLoaderMock);
     $designLoaderMock->expects($this->once())->method('load');
     $this->assertEquals('Expected', $plugin->aroundExecute($subjectMock, $closureMock, $requestMock));
 }