You are here

function AggregatorTestCase::getInvalidOpml in Drupal 7

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
Tests for aggregator.module.

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);
}