You are here

public function GMapMacroTest::testMacroRenamedDirectives in GMap Module 7.2

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

File

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

Class

GMapMacroTest

Code

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