You are here

public function ProxyConfigTest::proxyConfigurationData in Raven: Sentry Integration 8.2

Same name and namespace in other branches
  1. 3.x tests/src/Unit/ProxyConfigTest.php \Drupal\Tests\raven\Unit\ProxyConfigTest::proxyConfigurationData()

Data provider for testProxyConfiguration().

File

tests/src/Unit/ProxyConfigTest.php, line 59

Class

ProxyConfigTest
Test proxy configuration.

Namespace

Drupal\Tests\raven\Unit

Code

public function proxyConfigurationData() {
  return [
    // HTTP DSN, Empty proxy white-list.
    [
      'http://user:password@sentry.test/123456',
      [
        'http' => NULL,
        'https' => NULL,
        'no' => [],
      ],
      'no',
    ],
    [
      'http://user:password@sentry.test/123456',
      [
        'http' => 'http-proxy.server.test:3129',
        'https' => NULL,
        'no' => [],
      ],
      'http',
    ],
    [
      'http://user:password@sentry.test/123456',
      [
        'http' => NULL,
        'https' => 'https-proxy.server.test:3129',
        'no' => [],
      ],
      'no',
    ],
    [
      'http://user:password@sentry.test/123456',
      [
        'http' => 'http-proxy.server.test:3129',
        'https' => 'https-proxy.server.test:3129',
        'no' => [],
      ],
      'http',
    ],
    // HTTP DSN, Not empty proxy white-list.
    [
      'http://user:password@sentry.test/123456',
      [
        'http' => NULL,
        'https' => NULL,
        'no' => [
          'some.server.test',
        ],
      ],
      'no',
    ],
    [
      'http://user:password@sentry.test/123456',
      [
        'http' => 'http-proxy.server.test:3129',
        'https' => NULL,
        'no' => [
          'some.server.test',
        ],
      ],
      'http',
    ],
    [
      'http://user:password@sentry.test/123456',
      [
        'http' => NULL,
        'https' => 'https-proxy.server.test:3129',
        'no' => [
          'some.server.test',
        ],
      ],
      'no',
    ],
    [
      'http://user:password@sentry.test/123456',
      [
        'http' => 'http-proxy.server.test:3129',
        'https' => 'https-proxy.server.test:3129',
        'no' => [
          'some.server.test',
        ],
      ],
      'http',
    ],
    // HTTP DSN, Not empty proxy white-list, Sentry white-listed.
    [
      'http://user:password@sentry.test/123456',
      [
        'http' => NULL,
        'https' => NULL,
        'no' => [
          'some.server.test',
          'sentry.test',
        ],
      ],
      'no',
    ],
    [
      'http://user:password@sentry.test/123456',
      [
        'http' => 'http-proxy.server.test:3129',
        'https' => NULL,
        'no' => [
          'some.server.test',
          'sentry.test',
        ],
      ],
      'no',
    ],
    [
      'http://user:password@sentry.test/123456',
      [
        'http' => NULL,
        'https' => 'https-proxy.server.test:3129',
        'no' => [
          'some.server.test',
          'sentry.test',
        ],
      ],
      'no',
    ],
    [
      'http://user:password@sentry.test/123456',
      [
        'http' => 'http-proxy.server.test:3129',
        'https' => 'https-proxy.server.test:3129',
        'no' => [
          'some.server.test',
          'sentry.test',
        ],
      ],
      'no',
    ],
    // HTTPS DSN, Empty proxy white-list.
    [
      'https://user:password@sentry.test/123456',
      [
        'http' => NULL,
        'https' => NULL,
        'no' => [],
      ],
      'no',
    ],
    [
      'https://user:password@sentry.test/123456',
      [
        'http' => 'http-proxy.server.test:3129',
        'https' => NULL,
        'no' => [],
      ],
      'no',
    ],
    [
      'https://user:password@sentry.test/123456',
      [
        'http' => NULL,
        'https' => 'https-proxy.server.test:3129',
        'no' => [],
      ],
      'https',
    ],
    [
      'https://user:password@sentry.test/123456',
      [
        'http' => 'http-proxy.server.test:3129',
        'https' => 'https-proxy.server.test:3129',
        'no' => [],
      ],
      'https',
    ],
    // HTTPS DSN, Not empty proxy white-list.
    [
      'https://user:password@sentry.test/123456',
      [
        'http' => NULL,
        'https' => NULL,
        'no' => [
          'some.server.test',
        ],
      ],
      'no',
    ],
    [
      'https://user:password@sentry.test/123456',
      [
        'http' => 'http-proxy.server.test:3129',
        'https' => NULL,
        'no' => [
          'some.server.test',
        ],
      ],
      'no',
    ],
    [
      'https://user:password@sentry.test/123456',
      [
        'http' => NULL,
        'https' => 'https-proxy.server.test:3129',
        'no' => [
          'some.server.test',
        ],
      ],
      'https',
    ],
    [
      'https://user:password@sentry.test/123456',
      [
        'http' => 'http-proxy.server.test:3129',
        'https' => 'https-proxy.server.test:3129',
        'no' => [
          'some.server.test',
        ],
      ],
      'https',
    ],
    // HTTPS DSN, Not empty proxy white-list, Sentry white-listed.
    [
      'https://user:password@sentry.test/123456',
      [
        'http' => NULL,
        'https' => NULL,
        'no' => [
          'some.server.test',
          'sentry.test',
        ],
      ],
      'no',
    ],
    [
      'https://user:password@sentry.test/123456',
      [
        'http' => 'http-proxy.server.test:3129',
        'https' => NULL,
        'no' => [
          'some.server.test',
          'sentry.test',
        ],
      ],
      'no',
    ],
    [
      'https://user:password@sentry.test/123456',
      [
        'http' => NULL,
        'https' => 'https-proxy.server.test:3129',
        'no' => [
          'some.server.test',
          'sentry.test',
        ],
      ],
      'no',
    ],
    [
      'https://user:password@sentry.test/123456',
      [
        'http' => 'http-proxy.server.test:3129',
        'https' => 'https-proxy.server.test:3129',
        'no' => [
          'some.server.test',
          'sentry.test',
        ],
      ],
      'no',
    ],
  ];
}