public function FileTest::testProcessMissingField in YAML Content 8
@covers ::process
File
- tests/
src/ Unit/ Plugin/ yaml_content/ process/ FileTest.php, line 59
Class
- FileTest
- Test file processing.
Namespace
Drupal\Tests\yaml_content\Unit\Plugin\yaml_content\processCode
public function testProcessMissingField() {
$context = new ProcessingContext();
$context
->setContentLoader(new ContentLoader($this
->prophesize(ContainerInterface::class)
->reveal()));
$context
->getContentLoader()
->setContentPath(realpath($this
->getFixturePath() . '/../../'));
$data = [];
$this
->expectException(\Exception::class);
$this
->expectExceptionMessage('Missing field context.');
$this->filePlugin
->process($context, $data);
}