setAnnounceTestEndpoint example


  public function setUp():void {
    parent::setUp();

    $this->user = $this->drupalCreateUser(
      [
        'access toolbar',
        'access announcements',
      ]
    );

    AnnounceTestHttpClientMiddleware::setAnnounceTestEndpoint('/announce-feed-json/community-feeds');
  }

  /** * Check the status of the announcements when the feed is updated and removed. */
  public function testAnnounceFeedUpdatedAndRemoved() {
    $this->drupalLogin($this->user);
    $this->drupalGet('<front>');
    $this->clickLink('Announcements');
    $this->waitForOffCanvasToOpen();
    $page_html = $this->getSession()->getPage()->getHtml();
    
/** * {@inheritdoc} */
  protected $defaultTheme = 'stark';

  /** * {@inheritdoc} */
  public function setUp():void {
    parent::setUp();
    AnnounceTestHttpClientMiddleware::setAnnounceTestEndpoint('/announce-feed-json/community-feeds');
  }

  /** * Test of viewing announcements by a user with appropriate permission. */
  public function testAnnounceFirstLogin() {
    $this->drupalLogin(
      $this->drupalCreateUser(
        [
          'access toolbar',
          'access announcements',
        ]
Home | Imprint | This part of the site doesn't use cookies.