@@ -30,10 +30,10 @@ public function testServerVariablesInOperation(): void
3030 $ this ->api ->addPet ($ this ->pet , 2 );
3131 $ request = $ this ->fakeHttpClient ->getLastRequest ();
3232
33- $ this ->assertEquals ('petstore.swagger.io ' , $ request ->getUri ()->getHost (), 'Server variable set to default value. ' );
33+ $ this ->assertEquals ('path-server-test. petstore.local ' , $ request ->getUri ()->getHost (), 'Server variable set to default value. ' );
3434
3535 # Test variables substitution
36- $ this ->api ->addPet ($ this ->pet , 2 , [ 'server ' => 'qa-petstore ' , 'port ' => '8080 ' ]);
36+ $ this ->api ->addPet ($ this ->pet , 3 , [ 'server ' => 'qa-petstore ' , 'port ' => '8080 ' ]);
3737 $ request = $ this ->fakeHttpClient ->getLastRequest ();
3838
3939 $ this ->assertEquals ('qa-petstore.swagger.io ' , $ request ->getUri ()->getHost (), 'Server set to "qa-petstore" ' );
@@ -43,7 +43,7 @@ public function testServerVariablesInOperation(): void
4343 public function testLegacyServerChoiceInOperation (): void
4444 {
4545 # Test legacy behavior (set server using api->setHostIndex()
46- $ this ->api ->setHostIndex (1 );
46+ $ this ->api ->setHostIndex (2 );
4747 $ this ->api ->addPet ($ this ->pet );
4848 $ request = $ this ->fakeHttpClient ->getLastRequest ();
4949
@@ -53,6 +53,6 @@ public function testLegacyServerChoiceInOperation(): void
5353 public function testInvalidVariableValueInOperation (): void
5454 {
5555 $ this ->expectException (InvalidArgumentException::class);
56- $ this ->api ->addPet ($ this ->pet , 2 ,['server ' => 'invalid-value ' ]);
56+ $ this ->api ->addPet ($ this ->pet , 3 ,['server ' => 'invalid-value ' ]);
5757 }
5858}
0 commit comments