The WikibaseRepo.ViewFactory service wiring uses the ObjectCache::getLocalClusterInstance() function, which means that the unit test for that service wiring actually can’t run without MediaWiki being set up, because ObjectCache::getLocalClusterInstance() uses MediaWiki globals and the default service container.
A solution for this almost certainly requires T243233: MediaWiki should provide a LocalClusterObjectCache service.
To reproduce:
composer phpunit extensions/Wikibase/repo/tests/phpunit/unit/ServiceWiring/ViewFactoryTest.php