Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gmap
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
gmap
Commits
3b60e955
Commit
3b60e955
authored
12 years ago
by
fgm
Committed by
http://druler.com
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue #1650648 by fgm: Fixed GMap Tests do not pass, contain errors.
parent
f39508a9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/gmap.test
+11
-6
11 additions, 6 deletions
tests/gmap.test
with
11 additions
and
6 deletions
tests/gmap.test
+
11
−
6
View file @
3b60e955
...
...
@@ -6,7 +6,7 @@
*/
class
GMapSimpleAPITest
extends
DrupalUnitTestCase
{
function
getInfo
()
{
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'GMap API sanity checks'
,
'description'
=>
'Test the simple API functions in the public GMap API.'
,
...
...
@@ -17,7 +17,7 @@ class GMapSimpleAPITest extends DrupalUnitTestCase {
/**
* Verify gmap_todim().
*/
function
testGMapToDim
()
{
public
function
testGMapToDim
()
{
// Valid stuff
$this
->
assertEqual
(
gmap_todim
(
'500PX'
),
'500px'
,
t
(
'Testing case normalization'
));
$this
->
assertEqual
(
gmap_todim
(
' 500 px '
),
'500px'
,
t
(
'Testing spaces'
));
...
...
@@ -42,7 +42,7 @@ class GMapSimpleAPITest extends DrupalUnitTestCase {
}
class
GMapMacroTest
extends
DrupalUnitTestCase
{
function
getInfo
()
{
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'GMap Macro checks'
,
'description'
=>
'Test the ability to parse macros into map arrays.'
,
...
...
@@ -50,7 +50,12 @@ class GMapMacroTest extends DrupalUnitTestCase {
);
}
function
testEmptyMacro
()
{
public
function
setUp
()
{
parent
::
setUp
();
require_once
(
dirname
(
__FILE__
)
.
'/../gmap.module'
);
}
public
function
testEmptyMacro
()
{
$macro
=
''
;
$map
=
gmap_parse_macro
(
$macro
);
$this
->
assertEqual
(
preg_match
(
'/^auto\d+map$/'
,
$map
[
'id'
]),
1
,
t
(
'Testing ID injection'
));
...
...
@@ -67,7 +72,7 @@ class GMapMacroTest extends DrupalUnitTestCase {
$this
->
assertEqual
(
count
(
$map
),
1
,
t
(
'Testing contents of map array.'
));
}
function
testMacroBehaviorFlags
()
{
public
function
testMacroBehaviorFlags
()
{
$macro
=
'[gmap |behavior=+foobehavior +barbehavior -bazbehavior]'
;
$map
=
gmap_parse_macro
(
$macro
);
$b
=
$map
[
'behavior'
];
...
...
@@ -78,7 +83,7 @@ class GMapMacroTest extends DrupalUnitTestCase {
//$this->assertEqual(count($b), 3, t('Testing for leaked default flags'));
}
function
testMacroRenamedDirectives
()
{
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 diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment