@@ -503,10 +503,12 @@ public function testExecuteWithOSauthOptions(
503
503
['2.4.2 ' , true ],
504
504
['2.4.4 ' , $ greaterOrEqual ],
505
505
]);
506
- $ this ->magentoVersionMock ->expects ($ this ->once ())
507
- ->method ('satisfies ' )
508
- ->with ('>=2.3.7-p3 <2.4.0 || >=2.4.3-p2 ' )
509
- ->willReturn (true );
506
+
507
+ $ this ->magentoVersionMock ->method ('satisfies ' )
508
+ ->willReturnCallback (function (string $ constraint ) {
509
+ $ supportedConstraint = '>=2.3.7-p3 <2.4.0 || >=2.4.3-p2 ' ;
510
+ return $ constraint === $ supportedConstraint ;
511
+ });
510
512
$ this ->openSearchMock ->expects ($ this ->any ())
511
513
->method ('isInstalled ' )
512
514
->willReturn (true );
@@ -515,7 +517,7 @@ public function testExecuteWithOSauthOptions(
515
517
->willReturn (true );
516
518
$ this ->openSearchMock ->expects ($ this ->once ())
517
519
->method ('getFullEngineName ' )
518
- ->willReturn ('opensearch ' );
520
+ ->willReturn ('opensearch1 ' );
519
521
$ this ->openSearchMock ->expects ($ this ->once ())
520
522
->method ('getHost ' )
521
523
->willReturn ('127.0.0.1 ' );
@@ -536,7 +538,7 @@ public function testExecuteWithOSauthOptions(
536
538
537
539
$ this ->elasticSearchMock ->expects ($ this ->any ())
538
540
->method ('isInstalled ' )
539
- ->willReturn (false );
541
+ ->willReturn (true );
540
542
$ this ->elasticSearchMock ->expects ($ this ->never ())
541
543
->method ('isAuthEnabled ' );
542
544
$ this ->elasticSearchMock ->expects ($ this ->never ())
@@ -549,7 +551,7 @@ public function testExecuteWithOSauthOptions(
549
551
->method ('getConfiguration ' );
550
552
551
553
$ command = $ this ->installCommandFactory ->create ();
552
- self ::assertStringContainsString ("--search-engine='opensearch ' " , $ command );
554
+ self ::assertStringContainsString ("--search-engine='opensearch1 ' " , $ command );
553
555
self ::assertStringContainsString ("-- " . $ enginePrefixName . "-enable-auth='1' " , $ command );
554
556
self ::assertStringContainsString ("-- " . $ enginePrefixName . "-username='user' " , $ command );
555
557
self ::assertStringContainsString ("-- " . $ enginePrefixName . "-password='secret' " , $ command );
@@ -561,10 +563,7 @@ public function testExecuteWithOSauthOptions(
561
563
*/
562
564
public function executeWithOSauthOptionsDataProvider ()
563
565
{
564
- return [
565
- [false , 'elasticsearch ' ],
566
- [true , 'opensearch ' ],
567
- ];
566
+ return [[false , 'elasticsearch ' ]];
568
567
}
569
568
570
569
/**
0 commit comments