Commit e7be9365 authored by catch's avatar catch
Browse files

Issue #3421418 by mstrelan, Spokje, xjm, mondrake, longwave, acbramley: Add...

Issue #3421418 by mstrelan, Spokje, xjm, mondrake, longwave, acbramley: Add void return typehints to all test methods
parent cabbb939
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ public function setUp():void {
  /**
   * Test of viewing announcements by a user with appropriate permission.
   */
  public function testAnnounceFirstLogin() {
  public function testAnnounceFirstLogin(): void {
    $this->drupalLogin(
      $this->drupalCreateUser(
        [
@@ -62,7 +62,7 @@ public function testAnnounceFirstLogin() {
  /**
   * Testing announce icon without announce permission.
   */
  public function testAnnounceWithoutPermission() {
  public function testAnnounceWithoutPermission(): void {
    // User without "access announcements" permission.
    $account = $this->drupalCreateUser(
      [
+2 −2
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ public function setUp():void {
  /**
   * Check the status of the announcements when the feed is updated and removed.
   */
  public function testAnnounceFeedUpdatedAndRemoved() {
  public function testAnnounceFeedUpdatedAndRemoved(): void {
    $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322');
    $this->drupalLogin($this->user);
    $this->drupalGet('<front>');
@@ -88,7 +88,7 @@ public function testAnnounceFeedUpdatedAndRemoved() {
  /**
   * Check with an empty JSON feed.
   */
  public function testAnnounceFeedEmpty() {
  public function testAnnounceFeedEmpty(): void {
    // Change the feed url and reset temp storage.
    AnnounceTestHttpClientMiddleware::setAnnounceTestEndpoint('/announce-feed-json/empty');

+2 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ class AnnounceRendererTest extends AnnounceTestBase {
  /**
   * Tests rendered valid when something goes wrong.
   */
  public function testRendererException() {
  public function testRendererException(): void {
    $this->setTestFeedResponses([
      new Response(403),
    ]);
@@ -28,7 +28,7 @@ public function testRendererException() {
  /**
   * Tests rendered valid content.
   */
  public function testRendererContent() {
  public function testRendererContent(): void {
    $feed_item_1 = [
      'id' => '1001',
      'content_html' => 'Test teaser 1',
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ public function setUp():void {
   *
   * @dataProvider urlProvider
   */
  public function testValidateUrl($url, $isValid) {
  public function testValidateUrl($url, $isValid): void {
    $this->assertEquals($isValid, $this->fetcher->validateUrl($url));
  }

+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ class IpAddressBlockingTest extends BrowserTestBase {
  /**
   * Tests various user input to confirm correct validation and saving of data.
   */
  public function testIPAddressValidation() {
  public function testIPAddressValidation(): void {
    // Create user.
    $admin_user = $this->drupalCreateUser(['ban IP addresses']);
    $this->drupalLogin($admin_user);
Loading