function AggregatorTestBase::getInvalidOpml

Create an invalid OPML file.

Return value

Path to invalid OPML file.

1 call to AggregatorTestBase::getInvalidOpml()
ImportOpmlTest::submitImportForm in drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/ImportOpmlTest.php
Submit form with invalid, empty and valid OPML files.

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