public function testSetTemplateContext() { $template = 'themedir/template.phtml'; $context = new \Magento\Framework\DataObject(); $this->_validator->expects($this->once())->method('isValid')->with($template)->will($this->returnValue(true)); $this->_templateEngine->expects($this->once())->method('render')->with($context); $this->_block->setTemplateContext($context); $this->_block->fetchView($template); }