You could also use bash's exported function feature. However, given that fakeroot is an sh script, you'd need to be on a system where the sh implementation doesn't strip those BASH_FUNC_fname%% variables from the environment like dash does. To make sure it doesn't happen you could have fakeroot interpreted by bash itself as bash -o posix which is a sh interpreter.
#!/bin/bash -
myVar="foo"
testFunction() {
printf '%s\n' "$myVar"
}
export myVar
export -f testFunction
fakeroot=$(command -v fakeroot)
bash -o posix -- "${fakeroot:?fakeroot not found}" -- bash -c testFunction
Note that you also need to export myVar for that to be available to the bash started by fakeroot. Instead of calling export for both myVar and testFunction, you could also issue a set -o allexport before declaring them.