render($this->loadResource('hello_world.mjml')); $this->assertEquals($this->loadResource('hello_world.min.html.text'), $html); } public function testRenderWithInvalidBinaryThrowException() { $this->expectException(ProcessException::class); $this->expectExceptionMessage('unknown'); $renderer = new BinaryRenderer('unknown'); $renderer->render($this->loadResource('hello_world.mjml')); } public function testRenderWithMalformedMjml() { $this->expectException(ProcessException::class); $this->expectExceptionMessage('Malformed MJML. Check that your structure is correct and enclosed in tags.'); $renderer = new BinaryRenderer(__DIR__ . '/../../node_modules/.bin/mjml'); $renderer->render(''); } }