protected function FeedsEnclosureTest::getUrlParseErrorDataProvider in Feeds 7.2
Data provider for ::testUrlParseError().
1 call to FeedsEnclosureTest::getUrlParseErrorDataProvider()
- FeedsEnclosureTest::testUrlParseError in tests/
FeedsEnclosureTest.test - Tests getting content from an URL that failed to parse.
File
- tests/
FeedsEnclosureTest.test, line 51
Class
- FeedsEnclosureTest
- @coversDefaultClass FeedsEnclosure @group feeds
Code
protected function getUrlParseErrorDataProvider() {
return array(
array(
'url' => 'http://',
'error' => 'Download of @url failed because it could not be parsed.',
'vars' => array(),
),
array(
'url' => '//www.example.com/path?foo=bar',
'error' => "Download of @url failed because its scheme could not be determined. The URL is expected to start with something like '@example'.",
'vars' => array(
'@example' => 'http://',
),
),
array(
'url' => 'nonsupportedscheme://www.example.com',
'error' => 'Download of @url failed because its scheme is not supported: @error. Examples of supported schemes are: @supported.',
'vars' => array(
'@error' => 'invalid schema nonsupportedscheme',
'@supported' => implode(', ', array(
'http',
'https',
)),
),
),
);
}