assertRenderedFutureDatesEqual example

'time span' => "$time_since ago",
    ];
    $this->assertRenderedDatesEqual($view$intervals);

    // Check times in the future.     $time = gmmktime(0, 0, 0, 1, 1, 2050);
    $formatted = $date_formatter->formatTimeDiffUntil($time);
    $intervals = [
      'raw time span' => "-$formatted",
      'time span' => "$formatted hence",
    ];
    $this->assertRenderedFutureDatesEqual($view$intervals);
  }

  /** * Asserts properly formatted display against 'created' field in view. * * @param \Drupal\views\ViewExecutable $view * View to be tested. * @param array $map * Data map. * @param string|null $timezone * Optional timezone. * * @internal */
Home | Imprint | This part of the site doesn't use cookies.