12 class RawTest extends \PHPUnit\Framework\TestCase
25 $this->objectManagerHelper =
new ObjectManagerHelper($this);
27 $this->response = $this->createMock(HttpResponseInterface::class);
28 $this->raw = $this->objectManagerHelper->getObject(\
Magento\Framework\Controller\Result\Raw::class);
33 $content =
'<content>test</content>';
34 $this->assertInstanceOf(\
Magento\Framework\Controller\Result\Raw::class, $this->raw->setContents(
$content));
39 $content =
'<content>test</content>';
41 $this->response->expects($this->once())->method(
'setBody')->with(
$content);
42 $this->assertSame($this->raw, $this->raw->renderResult($this->response));