Skip to content

Why I am getting error “SetupTestCase not found” while running integration test failure?

I am trying to run an integration test on my local machine as follows:

../../../vendor/bin/phpunit --filter 'testInstallWithCodeBaseRollback' ../../../dev/tests/setup-integration/testsuite/Magento/Setup/DeclarativeInstallerTest.php

But Always it is returning with the below error:

PHP Fatal error: Uncaught Error: Class “MagentoTestFrameworkTestCaseSetupTestCase” not found in /opt/homebrew/var/www/pr/35174/dev/tests/setup-integration/testsuite/Magento/Setup/DeclarativeInstallerTest.php:22

Even though the SetupTestCase class is exists on this path.

Any clue how to resolve this issue?