public function HttpTest::headerDataProvider in Migrate Plus 8.4
Same name and namespace in other branches
- 8.5 tests/src/Kernel/Plugin/migrate_plus/data_fetcher/HttpTest.php \Drupal\Tests\migrate_plus\Kernel\Plugin\migrate_plus\data_fetcher\HttpTest::headerDataProvider()
Provides multiple test cases for the testHttpHeaders method.
Return value
array The test cases
File
- tests/
src/ Kernel/ Plugin/ migrate_plus/ data_fetcher/ HttpTest.php, line 32
Class
- HttpTest
- Class HttpTest.
Namespace
Drupal\Tests\migrate_plus\Kernel\Plugin\migrate_plus\data_fetcherCode
public function headerDataProvider() {
return [
'dummy headers specified' => [
'definition' => [
'headers' => [
'Accept' => 'application/json',
'User-Agent' => 'Internet Explorer 6',
'Authorization-Key' => 'secret',
'Arbitrary-Header' => 'foobarbaz',
],
],
'expected' => [
'Accept' => 'application/json',
'User-Agent' => 'Internet Explorer 6',
'Authorization-Key' => 'secret',
'Arbitrary-Header' => 'foobarbaz',
],
],
'no headers specified' => [
'definition' => [
'no_headers_here' => 'foo',
],
'expected' => [],
],
];
}