[ticket/63711] Move mock classes to files in tests/mock
[ticket/63771] Get rid of using trigger_error() to achieve better coverage