function AggregatorTestCase::getInvalidOpml

Creates an invalid OPML file.

Return value

Path to invalid OPML file.

1 call to AggregatorTestCase::getInvalidOpml()
ImportOPMLTestCase::submitImportForm in modules/aggregator/aggregator.test
Submits form with invalid, empty, and valid OPML files.

File

modules/aggregator/aggregator.test, line 248

Class

AggregatorTestCase
Defines a base class for testing the Aggregator module.

Code

function getInvalidOpml() {
    $opml = <<<EOF
<opml>
  <invalid>
</opml>
EOF;
    $path = 'public://invalid-opml.xml';
    return file_unmanaged_save_data($opml, $path);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.