You are here

public function GMapMacroTest::testMacroBehaviorFlags in GMap Module 7

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

File

tests/gmap.test, line 81
Unit tests for gmap.module.

Class

GMapMacroTest

Code

public 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'));

  // NOT passing through default flags was a bug.

  //$this->assertEqual(count($b), 3, t('Testing for leaked default flags'));
}