acquia_cms_person-1.3.0/tests/src/ExistingSite/PersonListTest.php

tests/src/ExistingSite/PersonListTest.php
<?php

namespace Drupal\Tests\acquia_cms_person\ExistingSite;

use Drupal\Core\Entity\Query\QueryInterface;
use Drupal\Tests\acquia_cms_common\ExistingSite\ContentTypeListTestBase;
use Drupal\views\Entity\View;

/**
 * Tests the "all people" listing page.
 *
 * @group acquia_cms_person
 * @group acquia_cms
 * @group low_risk
 * @group pr
 * @group push
 */
class PersonListTest extends ContentTypeListTestBase {

  /**
   * {@inheritdoc}
   */
  protected $nodeType = 'person';

  /**
   * {@inheritdoc}
   */
  protected function getView() : View {
    return View::load('people');
  }

  /**
   * {@inheritdoc}
   */
  protected function visitListPage($langcode = NULL) : void {
    $page = $langcode ? "/$langcode/people" : "/people";
    $this->drupalGet($page);
  }

  /**
   * {@inheritdoc}
   */
  protected function getQuery() : QueryInterface {
    return parent::getQuery()->sort('title');
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc