Added all the tests for isFunction, fixed bug #1026.