The size of the codebase is orthogonal to the size/complexity of the production environment.
Modern architectures look like this: https://github.com/donnemartin/system-design-primer
It is generally not feasible to recreate all of the elements of this design in a totally separate testing environment.