You are here

function GMapMacroTest::testMacroRenamedDirectives in GMap Module 6

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

File

tests/gmap.test, line 79

Class

GMapMacroTest

Code

function testMacroRenamedDirectives() {
  $macro = '[gmap |type=Foo |control=Bar |behaviour=+baz |tcontrol=on]';
  $map = gmap_parse_macro($macro);
  $this
    ->assertEqual($map['maptype'], 'Foo', t('Testing type -> maptype conversion'));
  $this
    ->assertEqual($map['controltype'], 'Bar', t('Testing control -> controltype conversion'));
  $this
    ->assertEqual($map['behavior']['baz'], TRUE, t('Testing behaviour -> behavior conversion'));
  $this
    ->assertEqual($map['mtc'], 'standard', t('Testing tcontrol -> mtc=standard'));
}