You are here

public function AggregatorTestBase::getInvalidOpml in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/aggregator/src/Tests/AggregatorTestBase.php \Drupal\aggregator\Tests\AggregatorTestBase::getInvalidOpml()

Creates an invalid OPML file.

Return value

string Path to invalid OPML file.

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

File

core/modules/aggregator/src/Tests/AggregatorTestBase.php, line 284
Contains \Drupal\aggregator\Tests\AggregatorTestBase.

Class

AggregatorTestBase
Defines a base class for testing the Aggregator module.

Namespace

Drupal\aggregator\Tests

Code

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