File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1212use Composer \Package \RootPackageInterface ;
1313use Composer \Repository \RepositoryManager ;
1414use Composer \Repository \WritableRepositoryInterface ;
15+ use Composer \Repository \InstalledRepositoryInterface ;
1516use Magento \CloudPatches \Composer \MagentoVersion ;
1617use PHPUnit \Framework \MockObject \MockObject ;
1718use PHPUnit \Framework \TestCase ;
@@ -24,7 +25,7 @@ class MagentoVersionTest extends TestCase
2425 const VERSION = '2.3.5 ' ;
2526
2627 /**
27- * @var WritableRepositoryInterface|MockObject
28+ * @var WritableRepositoryInterface|InstalledRepositoryInterface| MockObject
2829 */
2930 private $ repository ;
3031
@@ -43,7 +44,11 @@ class MagentoVersionTest extends TestCase
4344 */
4445 protected function setUp (): void
4546 {
46- $ this ->repository = $ this ->getMockForAbstractClass (WritableRepositoryInterface::class);
47+ $ this ->repository = $ this ->getMockForAbstractClass (
48+ (version_compare (PHP_VERSION , '7.3 ' ) == -1 )
49+ ? WritableRepositoryInterface::class
50+ : InstalledRepositoryInterface::class
51+ );
4752 $ this ->rootPackage = $ this ->getMockForAbstractClass (RootPackageInterface::class);
4853 $ repositoryManager = $ this ->createMock (RepositoryManager::class);
4954 $ repositoryManager ->method ('getLocalRepository ' )
You can’t perform that action at this time.
0 commit comments