public function GMapMacroTest::testMacroBehaviorFlags in GMap Module 7
Same name and namespace in other branches
- 6 tests/gmap.test \GMapMacroTest::testMacroBehaviorFlags()
- 7.2 tests/gmap.test \GMapMacroTest::testMacroBehaviorFlags()
File
- tests/
gmap.test, line 81 - Unit tests for gmap.module.
Class
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'));
}