You are here

public function MetatagCoreUnitTest::testConfigInstanceSort in Metatag 7

Test the _metatag_config_instance_sort() function.

File

tests/MetatagCoreUnitTest.test, line 148
Unit tests for the Metatag module.

Class

MetatagCoreUnitTest
Unit tests for the Metatag module.

Code

public function testConfigInstanceSort() {
  $input = array(
    'node:article',
    'global:frontpage',
    'file',
    'node:page',
    'global',
    'node',
    'global:404',
  );
  usort($input, '_metatag_config_instance_sort');
  $this
    ->assertIdentical($input, array(
    'global',
    'global:404',
    'global:frontpage',
    'file',
    'node',
    'node:article',
    'node:page',
  ));
}