Commit c4459749 authored by Damien McKenna's avatar Damien McKenna
Browse files

Issue #2587369 by DamienMcKenna: Added two placeholder files for storing tests...

Issue #2587369 by DamienMcKenna: Added two placeholder files for storing tests for the Views integration.
parent 08bb5992
Loading
Loading
Loading
Loading
+2 −0
Changes for CHANGELOG.txt: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@ Metatag 7.x-1.x-dev, xxxx-xx-xx
#2580623 by marcvangend: Incorrect check for admin_language.
#2580523 by DamienMcKenna: Add a note to hook_requirements if hreflang module
  is not installed and there are multiple locales enabled on the site.
#2587369 by DamienMcKenna: Added two placeholder files for storing tests for the
  Views integration.


Metatag 7.x-1.7, 2015-07-24
+1 −0
Changes for metatag.info: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ files[] = tests/metatag.unit.test
files[] = tests/metatag.node.test
files[] = tests/metatag.term.test
files[] = tests/metatag.user.test
files[] = tests/metatag.views.test

; This is required for testing image handling.
test_dependencies[] = devel
+3 −0
Changes for metatag_views/metatag_views.info: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -7,3 +7,6 @@ dependencies[] = metatag
dependencies[] = views

files[] = metatag_views_plugin_display_extender_metatags.inc

; Tests.
files[] = tests/metatag_views.test
+53 −0
Changes for metatag_views/metatag_views.test: 53 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php
/**
 * @file
 * Tests for the Metatag module for the direct Views integration.
 */

class MetatagViewsTest extends MetatagTestHelper {
  /**
   * Admin user.
   *
   * @var \StdClass
   */
  protected $adminUser;

  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Metatag Views tests',
      'description' => 'Test Metatag integration via the Metatag:Views module.',
      'group' => 'Metatag',
    );
  }

  /**
   * {@inheritdoc}
   */
  function setUp(array $modules = array()) {
    $modules[] = 'views';

    parent::setUp($modules);
  }

  /**
   * Test the metatag_config_load_with_defaults() function.
   */
  // public function testConfigLoadDefaults() {
  //   // Load the global defaults, inc the fake entity.
  //   $defaults = metatag_config_load_with_defaults('test:foo');
  //
  //   // Load the example values and verify they're the same as the globals.
  //   $extra_tags = array(
  //     // Fake meta tag.
  //     'test:foo' => array('value' => 'foobar'),
  //   );
  //   $new_values = array_merge($extra_tags, $this->getTestDefaults());
  //
  //   // Confirm that the values are equal.
  //   $this->assertEqual($defaults, $new_values);
  // }

}
+54 −0
Changes for tests/metatag.views.test: 54 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php
/**
 * @file
 * Tests for the Metatag module for Views integration, outside of
 * Metatag:Views.
 */

class MetatagWithViewsTest extends MetatagTestHelper {
  /**
   * Admin user.
   *
   * @var \StdClass
   */
  protected $adminUser;

  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Metatag UI tests for Views',
      'description' => 'Test Metatag integration with the Views module.',
      'group' => 'Metatag',
    );
  }

  /**
   * {@inheritdoc}
   */
  function setUp(array $modules = array()) {
    $modules[] = 'views';

    parent::setUp($modules);
  }

  /**
   * Test the metatag_config_load_with_defaults() function.
   */
  // public function testConfigLoadDefaults() {
  //   // Load the global defaults, inc the fake entity.
  //   $defaults = metatag_config_load_with_defaults('test:foo');
  //
  //   // Load the example values and verify they're the same as the globals.
  //   $extra_tags = array(
  //     // Fake meta tag.
  //     'test:foo' => array('value' => 'foobar'),
  //   );
  //   $new_values = array_merge($extra_tags, $this->getTestDefaults());
  //
  //   // Confirm that the values are equal.
  //   $this->assertEqual($defaults, $new_values);
  // }

}