Inject test dependencies recursively