function AggregatorTestBase::getInvalidOpml
Same name in this branch
- 8.9.x core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php \Drupal\Tests\aggregator\Functional\AggregatorTestBase::getInvalidOpml()
Same name in other branches
- 9 core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php \Drupal\Tests\aggregator\Functional\AggregatorTestBase::getInvalidOpml()
Creates an invalid OPML file.
Return value
string Path to invalid OPML file.
File
-
core/
modules/ aggregator/ src/ Tests/ AggregatorTestBase.php, line 308
Class
- AggregatorTestBase
- Defines a base class for testing the Aggregator module.
Namespace
Drupal\aggregator\TestsCode
public function getInvalidOpml() {
$opml = <<<EOF
<opml>
<invalid>
</opml>
EOF;
$path = 'public://invalid-opml.xml';
return \Drupal::service('file_system')->saveData($opml, $path);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.