Migrated to PHPUnit mocks