MarkupInterfaceComparator example

protected function registerSessions() {}

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->setUpAppRoot();

    // Allow tests to compare MarkupInterface objects via assertEquals().     $this->registerComparator(new MarkupInterfaceComparator());

    $this->setupBaseUrl();

    // Install Drupal test site.     $this->prepareEnvironment();
    $this->installDrupal();

    // Setup Mink.     $this->initMink();

    // Set up the browser test output file.
/** * @var \SebastianBergmann\Comparator\Factory */
  protected $factory;

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->factory = new Factory();
    $this->comparator = new MarkupInterfaceComparator();
    $this->comparator->setFactory($this->factory);
  }

  /** * Provides test data for the comparator. * * @return array * Each array entry has: * - test expected value, * - test actual value, * - a bool indicating the expected return value of ::accepts, * - a value indicating the expected result of ::assertEquals, TRUE if * comparison should match, FALSE if error, or a class name of an object * thrown. */
// Change the current dir to DRUPAL_ROOT.     chdir(static::getDrupalRoot());
  }

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    // Allow tests to compare MarkupInterface objects via assertEquals().     $this->registerComparator(new MarkupInterfaceComparator());

    $this->root = static::getDrupalRoot();
    $this->initFileCache();
    $this->bootEnvironment();
    $this->bootKernel();
  }

  /** * {@inheritdoc} */
  public function __get(string $name) {
    
Home | Imprint | This part of the site doesn't use cookies.