onCollisionEnter function called from another object.

Is it possible to make something like this:

var objectToTest:GameObject;
function Update () {
    if(objectToTest.collider.OnCollisionEnter){
        print("objectToTest collided with something!");
    }
}

?

so to define what happens OnCollisionEnter from outside the object that actually collides? thanks in advance

No, you can't, because functions are not boolean variables. You need to set up a state in the other script, like this:

public bool isColliding = false;

void OnCollisionEnter(Collision o)
{
    isColliding = true;
}

void OnCollisionExit(Collision o)
{
    isColliding = false;
}

Then just read the bool.