You are here

public function CtoolsModuleTestCase::testClassesAddRemove in Chaos Tool Suite (ctools) 7

Test that the ctools_classs_add and ctools_classs_remove interact well.

File

tests/ctools.test, line 208
Test classes for code in the CTools module file.

Class

CtoolsModuleTestCase
Test menu links depending on user permissions.

Code

public function testClassesAddRemove() {
  ctools_class_reset();
  ctools_class_add('testclass');
  ctools_class_remove('testclass');
  $classes = ctools_get_classes();
  $this
    ->assertTrue(isset($classes['html']['add']), 'Classes array has an add set');
  $this
    ->assertEqual($classes['html']['add'], array(
    'testclass',
  ), 'testclass is in the add set');
  $this
    ->assertTrue(isset($classes['html']['remove']), 'Classes array has a remove set');

  // TODO: Is it really good to let this happen?
  $this
    ->assertEqual($classes['html']['remove'], array(
    'testclass',
  ), 'testclass is in the remove set');
}