Commit 2dc0f974 authored by Damien McKenna's avatar Damien McKenna Committed by Damien McKenna
Browse files

Issue #3123583 by DamienMcKenna, Berdir, jonathan1055: Add Devel dependency, tests back again.

parent b45a2906
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@ Metatag 8.x-1.x-dev, xxxx-xx-xx
  to the amphtml meta tag.
#3193502 by DaliaMoh, aritrika.d, DamienMcKenna: Extra if() statement in
  _metatag_is_migration_plugin_supported().
#3123583 by DamienMcKenna, Berdir, jonathan1055: Add Devel dependency, tests
  back again.


Metatag 8.x-1.15, 2020-12-05
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
    "drupal/token": "^1.0"
  },
  "require-dev": {
    "drupal/devel": "^4.0",
    "drupal/redirect": "1.x-dev",
    "drupal/page_manager": "4.x-dev",
    "drupal/panelizer": "4.x-dev"
+2 −0
Original line number Diff line number Diff line
@@ -7,3 +7,5 @@ configure: entity.metatag_defaults.collection
dependencies:
  - drupal:field
  - token:token
test_dependencies:
  - devel:devel
+36 −0
Original line number Diff line number Diff line
<?php

namespace Drupal\Tests\metatag\Functional;

/**
 * Verify that enabling WebProfiler won't cause the site to blow up.
 *
 * @group metatag
 */
class EnsureDevelWebProfilerWorks extends EnsureDevelWorks {

  /**
   * {@inheritdoc}
   */
  public static $modules = [
    // Modules for core functionality.
    'node',
    'field',
    'field_ui',
    'user',

    // Contrib dependencies.
    'token',

    // This module.
    'metatag',

    // Use the custom route to verify the site works.
    'metatag_test_custom_route',

    // The modules to test.
    'devel',
    'webprofiler',
  ];

}
+58 −0
Original line number Diff line number Diff line
<?php

namespace Drupal\Tests\metatag\Functional;

use Drupal\Tests\BrowserTestBase;

/**
 * Verify that enabling Devel won't cause the site to blow up.
 *
 * @group metatag
 */
class EnsureDevelWorks extends BrowserTestBase {

  // Contains helper methods.
  use MetatagHelperTrait;

  /**
   * {@inheritdoc}
   */
  public static $modules = [
    // Modules for core functionality.
    'node',
    'field',
    'field_ui',
    'user',

    // Contrib dependencies.
    'token',

    // This module.
    'metatag',

    // Use the custom route to verify the site works.
    'metatag_test_custom_route',

    // The modules to test.
    'devel',
  ];

  /**
   * Load the custom route, make sure something is output.
   */
  public function testCustomRoute() {
    $this->drupalGet('metatag_test_custom_route');
    $this->assertResponse(200);
    $this->assertText('Hello world!');
  }

  /**
   * Make sure that the system still works when some example content exists.
   */
  public function testNode() {
    $node = $this->createContentTypeNode();
    $this->drupalGet($node->toUrl());
    $this->assertResponse(200);
  }

}