You are here

public function PatternsIndexesTestCase::testModuletags in Patterns 7.2

Same name and namespace in other branches
  1. 7 tests/indexes/indexes.test \PatternsIndexesTestCase::testModuletags()

File

tests/indexes/indexes.test, line 44
General SimpleTests for Patterns. Also, a Pattern running base class which uses QuickRun.

Class

PatternsIndexesTestCase
@file General SimpleTests for Patterns. Also, a Pattern running base class which uses QuickRun.

Code

public function testModuletags() {
  $moduletags = patterns_moduletags_get_index(NULL, TRUE, TRUE);
  $components = patterns_io_list_components(TRUE);
  $nc = count($components);
  $this
    ->assertNotNull($moduletags, 'Moduletags index should not be NULL');
  $this
    ->assertEqual(count($moduletags), $nc, t('Moduletags index should have length equal of the number of available components'));
  $nc = $this
    ->countComponents();
  $this
    ->assertEqual(count($moduletags), $nc, t('Moduletags index should have length %nc, %found found', array(
    '%nc' => $nc,
    '%found' => count($moduletags),
  )));
}