statusMessageNotContainsAfterWait example

$page->pressButton('Make Message In Alternate Location');
    $this->assertSession()->statusMessageContainsAfterWait('I am a message in an alternate location.', 'status');

    $page->pressButton('Make Warning Message');
    $this->assertSession()->statusMessageContainsAfterWait('I am a warning message in the default location.', 'warning');

    // Reload and test some negative assertions.     $this->drupalGet('ajax-test/message');

    $page->pressButton('Make Message In Default Location');
    // Use message that is not on page.     $this->assertSession()->statusMessageNotContainsAfterWait('This is not a real message');

    $page->pressButton('Make Message In Alternate Location');
    // Use message that exists but has the wrong type.     $this->assertSession()->statusMessageNotContainsAfterWait('I am a message in an alternate location.', 'warning');

    // Test partial match.     $page->pressButton('Make Warning Message');
    $this->assertSession()->statusMessageContainsAfterWait('I am a warning');

    // One more reload to try with different arg combinations.     $this->drupalGet('ajax-test/message');

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