<html>
<head>
  <script src="../lib/OpenLayers.js"></script>
  <script type="text/javascript"><!--
    var layer; 

    function test_01_Layer_Marker_constructor (t) {
        t.plan( 2 );
        
        layer = new OpenLayers.Layer.Marker('Test Layer');
        t.ok( layer instanceof OpenLayers.Layer.Marker, "new OpenLayers.Layer.Marker returns object" );
        t.eq( layer.name, "Test Layer", "layer.name is correct" );
    }
    function test_02_Layer_Marker_addlayer (t) {
        t.plan( 3 );
        
        layer = new OpenLayers.Layer.Marker('Test Layer');
        t.ok( layer instanceof OpenLayers.Layer.Marker, "new OpenLayers.Layer.Marker returns object" );
        t.eq( layer.name, "Test Layer", "layer.name is correct" );
        layer.addMarker(new OpenLayers.Marker(new OpenLayers.Icon(), new OpenLayers.Size()));
        t.eq( layer.markers.length, 1, "addLayer adds marker to layer." );
    }

    function test_99_Layer_Marker_destroy (t) {
        t.plan( 1 );    
        layer = new OpenLayers.Layer.Marker('Test Layer');
        var map = new OpenLayers.Map('map');
        map.addLayer(layer);
        layer.destroy();
        t.eq( layer.map, null, "layer.map is null after destroy" );
    }
  // -->
  </script>
</head>
<body>
</body>
</html>

<html>
<head>
  <script src="../lib/OpenLayers.js"></script>
  <script type="text/javascript"><!--
    var layer; 

    function test_01_Layer_Marker_constructor (t) {
        t.plan( 2 );
        
        layer = new OpenLayers.Layer.Marker('Test Layer');
        t.ok( layer instanceof OpenLayers.Layer.Marker, "new OpenLayers.Layer.Marker returns object" );
        t.eq( layer.name, "Test Layer", "layer.name is correct" );
    }
    function test_02_Layer_Marker_addlayer (t) {
        t.plan( 3 );
        
        layer = new OpenLayers.Layer.Marker('Test Layer');
        t.ok( layer instanceof OpenLayers.Layer.Marker, "new OpenLayers.Layer.Marker returns object" );
        t.eq( layer.name, "Test Layer", "layer.name is correct" );
        layer.addMarker(new OpenLayers.Marker(new OpenLayers.Icon(), new OpenLayers.Size()));
        t.eq( layer.markers.length, 1, "addLayer adds marker to layer." );
    }

    function test_99_Layer_Marker_destroy (t) {
        t.plan( 1 );    
        layer = new OpenLayers.Layer.Marker('Test Layer');
        var map = new OpenLayers.Map('map');
        map.addLayer(layer);
        layer.destroy();
        t.eq( layer.map, null, "layer.map is null after destroy" );
    }
  // -->
  </script>
</head>
<body>
  <div id="map"></div>
</body>
</html>

Fix Layer.Marker test file: <div id="map"> wasn't defined in the file.
Fix Layer.Marker test file: <div id="map"> wasn't defined in the file.


git-svn-id: 86a4f41f9d0383640198789122b520d4105b319a@203 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
