You are here

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

Test that the ctools_classs_add and ctools_classs_remove interact well .. 2.

File

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

Class

CtoolsModuleTestCase
Test menu links depending on user permissions.

Code

public function testClassesAddRemove2() {
  ctools_class_reset();
  ctools_class_add('class2 class3');
  ctools_class_remove('class3');
  $classes = ctools_get_classes();
  $this
    ->assertTrue(isset($classes['html']['add']), 'Classes array has an add set');
  $this
    ->assertEqual($classes['html']['add'], array(
    'class2 class3',
  ), 'Added class2 class3 is in 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(
    'class3',
  ), 'class3 in remove set');
}