Skip to content

Commit

Permalink
Restore standard testing profile for unit test, update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jen Lampton committed Nov 22, 2016
1 parent 83f9ab7 commit 1c51b66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 4 additions & 5 deletions metatag.module
Original file line number Diff line number Diff line change
Expand Up @@ -1604,16 +1604,15 @@ function metatag_entity_supports_metatags($entity_type = NULL, $bundle = NULL) {
$entity_types = &backdrop_static(__FUNCTION__);
$settings = config('metatag.settings');

// Identify which entities & bundles are supported the first time the
// function is called.
// Identify which entities & bundles are supported.
if (!isset($entity_types)) {
foreach (entity_get_info() as $entity_name => $entity_info) {

// Verify that this entity type is suitable.
$entity_types[$entity_name] = metatag_entity_type_is_suitable($entity_name, $entity_info);

// The entity type technically supports entities.
if (!empty($entity_types[$entity_name])) {
// Disable only if overridden.

// Entiy types are enabled by default, see if they have been disabled.
if ($settings->get('metatag_enable_' . $entity_name) == FALSE) {
$entity_types[$entity_name] = FALSE;
}
Expand Down
3 changes: 1 addition & 2 deletions tests/metatag.unit.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,21 @@
* @todo These aren't really unit tests, we might need to fix that.
*/
class MetatagCoreUnitTest extends MetatagTestHelper {
protected $profile = 'standard';

/**
* 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');
//ksort($defaults);

// Load example value and verify it's the same as the global.
$extra_tags = array(
// Fake meta tag.
'test:foo' => array('value' => 'foobar'),
);
$new_values = array_merge($extra_tags, $this->getTestDefaults());
//ksort($new_values);

// Confirm that the values are equal.
$this->assertEqual($defaults, $new_values);
Expand Down

0 comments on commit 1c51b66

Please sign in to comment.