public function GMapMacroTest::testEmptyMacro in GMap Module 7
Same name and namespace in other branches
- 6 tests/gmap.test \GMapMacroTest::testEmptyMacro()
- 7.2 tests/gmap.test \GMapMacroTest::testEmptyMacro()
File
- tests/
gmap.test, line 64 - Unit tests for gmap.module.
Class
Code
public function testEmptyMacro() {
$macro = '';
$map = gmap_parse_macro($macro);
$this
->assertEqual(preg_match('/^auto\\d+map$/', $map['id']), 1, t('Testing ID injection'));
$this
->assertEqual(count($map), 1, t('Testing contents of map array.'));
$macro = '[gmap]';
$map = gmap_parse_macro($macro);
$this
->assertEqual(preg_match('/^auto\\d+map$/', $map['id']), 1, t('Testing ID injection'));
$this
->assertEqual(count($map), 1, t('Testing contents of map array.'));
$macro = '[gmap ]';
$map = gmap_parse_macro($macro);
$this
->assertEqual(preg_match('/^auto\\d+map$/', $map['id']), 1, t('Testing ID injection'));
$this
->assertEqual(count($map), 1, t('Testing contents of map array.'));
}