/** * @test * @return void */ public function testSetTheme() { $themeId = 1; $themePath = '/path/to/theme'; $theme = $this->getMockBuilder('Magento\\Framework\\View\\Design\\ThemeInterface')->getMock(); $theme->expects($this->once())->method('getId')->willReturn($themeId); $theme->expects($this->once())->method('getThemePath')->willReturn($themePath); /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ $this->model->setTheme($theme); $this->assertEquals($themeId, $this->model->getThemeId()); $this->assertEquals($themePath, $this->model->getThemePath()); }