You are here

RngSiteTestBase.php in RNG - Events and Registrations 3.x

Same filename and directory in other branches
  1. 8.2 src/Tests/RngSiteTestBase.php
  2. 8 src/Tests/RngSiteTestBase.php

Namespace

Drupal\rng\Tests

File

src/Tests/RngSiteTestBase.php
View source
<?php

namespace Drupal\rng\Tests;

use Drupal\rng\Form\EventTypeForm;

/**
 * Sets up page and article content types.
 */
abstract class RngSiteTestBase extends RngWebTestBase {
  public static $modules = [
    'rng',
    'node',
  ];

  /**
   * @var \Drupal\rng\Entity\RegistrationTypeInterface
   */
  public $registration_type;

  /**
   * @var \Drupal\rng\Entity\EventTypeInterface
   */
  public $event_bundle;

  /**
   * @var \Drupal\rng\Entity\EventTypeInterface
   */
  public $event_type;

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();
    $this->event_bundle = $this
      ->drupalCreateContentType();
    $this->event_type = $this
      ->createEventType('node', $this->event_bundle
      ->id());
    EventTypeForm::createDefaultRules('node', $this->event_bundle
      ->id());
    $this->registration_type = $this
      ->createRegistrationType();
  }

}

Classes

Namesort descending Description
RngSiteTestBase Sets up page and article content types.