diff --git a/tests/Control/SelectFeature.html b/tests/Control/SelectFeature.html
index e21f46098fc..92d3a7edf99 100644
--- a/tests/Control/SelectFeature.html
+++ b/tests/Control/SelectFeature.html
@@ -625,7 +625,7 @@
}
function test_addLayer(t) {
- t.plan(4);
+ t.plan(5);
var layer = new OpenLayers.Layer.Vector();
var layers = [new OpenLayers.Layer.Vector(), new OpenLayers.Layer.Vector()]
@@ -634,14 +634,16 @@
var controlWithLayer = new OpenLayers.Control.SelectFeature(layer);
var controlWithLayers = new OpenLayers.Control.SelectFeature(layers);
+ t.ok(controlWithLayer.layer instanceof OpenLayers.Layer.Vector, "layer is an instance of OpenLayers.Layer.Vector");
+
controlWithLayer.addLayer(layerToAdd);
controlWithLayers.addLayer(layerToAdd);
t.eq(controlWithLayer.layers.length, 2, "the added layer is added and all layers are active");
t.eq(controlWithLayers.layers.length, 3, "the added layer is added and all layers are active");
- t.eq(controlWithLayer.layer.length, null, "layer is empty");
- t.eq(controlWithLayers.layer.length, null, "layer is empty");
+ t.ok(controlWithLayer.layer instanceof OpenLayers.Layer.Vector.RootContainer, "layer has changed from OpenLayers.Layer.Vector to OpenLayers.Layer.Vector.RootContainer");
+ t.ok(controlWithLayers.layer instanceof OpenLayers.Layer.Vector.RootContainer, "layer still a OpenLayers.Layer.Vector.RootContainer");
}