Create an invalid OPML file.
Return value
Path to invalid OPML file.
File
- drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php, line 252
- Definition of Drupal\aggregator\Tests\AggregatorTestBase.
Class
- AggregatorTestBase
- Defines a base class for testing aggregator.module.
Namespace
Drupal\aggregator\Tests
Code
function getInvalidOpml() {
$opml = <<<EOF
<opml>
<invalid>
</opml>
EOF;
$path = 'public://invalid-opml.xml';
return file_unmanaged_save_data($opml, $path);
}