You are here

function GMapMacroTest::testMacroBehaviorFlags in GMap Module 6

Same name and namespace in other branches
  1. 7.2 tests/gmap.test \GMapMacroTest::testMacroBehaviorFlags()
  2. 7 tests/gmap.test \GMapMacroTest::testMacroBehaviorFlags()

File

tests/gmap.test, line 69

Class

GMapMacroTest

Code

function testMacroBehaviorFlags() {
  $macro = '[gmap |behavior=+foobehavior +barbehavior -bazbehavior]';
  $map = gmap_parse_macro($macro);
  $b = $map['behavior'];
  $this
    ->assertEqual($b['foobehavior'], TRUE, t('Testing +behavior'));
  $this
    ->assertEqual($b['barbehavior'], TRUE, t('Testing another +behavior'));
  $this
    ->assertEqual($b['bazbehavior'], FALSE, t('Testing -behavior'));
  $this
    ->assertEqual(count($b), 3, t('Testing for leaked default flags'));
}