You are here

protected function FeedsExHtmlTests::setContext in Feeds extensible parsers 7

Same name and namespace in other branches
  1. 7.2 src/Tests/FeedsExHtml.test \FeedsExHtmlTests::setContext()

Sets the form context value.

Parameters

string $id: The importer id.

string $value: The context value.

1 call to FeedsExHtmlTests::setContext()
FeedsExHtmlTests::test in src/Tests/FeedsExHtml.test
Tests the full import process.

File

src/Tests/FeedsExHtml.test, line 321

Class

FeedsExHtmlTests
Integration tests for FeedsExHtml.

Code

protected function setContext($id, $value) {
  $importer = feeds_importer($id);
  $config = $importer->parser
    ->getConfig();
  $config['context']['value'] = $value;
  $importer->parser
    ->setConfig($config);
  $importer
    ->save();
}