assertNoJavaScript example


  public function testNoJavaScript() {
    // Create a node of content type 'article' that is listed on the frontpage.     $this->drupalCreateNode([
      'type' => 'article',
      'promote' => NodeInterface::PROMOTED,
    ]);

    // Test frontpage.     $this->drupalGet('');
    $this->assertNoJavaScript();

    // Test node page.     $this->drupalGet('node/1');
    $this->assertNoJavaScript();

    // Test user profile page.     $user = $this->drupalCreateUser();
    $this->drupalGet('user/' . $user->id());
    $this->assertNoJavaScript();
  }

  
Home | Imprint | This part of the site doesn't use cookies.