Verified Commit 654b1f20 authored by Dave Long's avatar Dave Long
Browse files

Issue #3353210 by mondrake, PrabuEla, Spokje: [PHPUnit 10] @dataProvider...

Issue #3353210 by mondrake, PrabuEla, Spokje: [PHPUnit 10] @dataProvider methods must be declared static and public
parent 4c6cd6e3
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ public function testFeedFields(): void {
  /**
   * Data provider for testShowAnnouncements().
   */
  public function providerShowAnnouncements(): array {
  public static function providerShowAnnouncements(): array {
    return [
      '1' => [
        'feed_item' => [
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public function testValidateUrl($url, $isValid) {
  /**
   * Data for the testValidateUrl.
   */
  public function urlProvider(): array {
  public static function urlProvider(): array {
    return [
      ['https://www.drupal.org', TRUE],
      ['https://drupal.org', TRUE],
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ class BlockedIpsTest extends MigrateSqlSourceTestBase {
  /**
   * {@inheritdoc}
   */
  public function providerSource() {
  public static function providerSource() {
    $tests = [];

    $tests[0]['source_data']['blocked_ips'] = [
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ public function testProcessPlaceholders(array $placeholders, $method, $route_mat
  /**
   * @see \Drupal\big_pipe_test\BigPipePlaceholderTestCases
   */
  public function placeholdersProvider() {
  public static function placeholdersProvider() {
    $cases = BigPipePlaceholderTestCases::cases();

    // Generate $placeholders variable as expected by
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ public function testHandle(false|int $expected_header, Response $response) {
    $this->assertSame((string) $expected_header, $response->headers->get('Content-Length'));
  }

  public function providerTestSetContentLengthHeader() {
  public static function providerTestSetContentLengthHeader() {
    $response = new Response('Test content', 200);
    $response->headers->set('Content-Length', (string) strlen('Test content'));
    return [
Loading