99use Hypernode \Api \Exception \HypernodeApiServerException ;
1010use Hypernode \Api \HypernodeClientTestCase ;
1111
12- class EphemeralAppTest extends HypernodeClientTestCase
12+ class BrancherAppTest extends HypernodeClientTestCase
1313{
14- public function testCreateEphemeralApp ()
14+ public function testCreateBrancherApp ()
1515 {
1616 $ this ->responses ->append (
1717 new Response (200 , [], json_encode ([
1818 'name ' => 'johndoe-eph123456 ' ,
1919 'parent ' => 'johndoe ' ,
20- 'type ' => 'ephemeral ' ,
20+ 'type ' => 'brancher ' ,
2121 ])),
2222 );
2323
24- $ ephemeralAppName = $ this ->client ->ephemeralApp ->create ('johndoe ' );
24+ $ brancherAppName = $ this ->client ->brancherApp ->create ('johndoe ' );
2525
2626 $ request = $ this ->responses ->getLastRequest ();
2727 $ this ->assertEquals ('POST ' , $ request ->getMethod ());
28- $ this ->assertEquals ('/v2/app/johndoe/ephemeral / ' , $ request ->getUri ());
29- $ this ->assertEquals ('johndoe-eph123456 ' , $ ephemeralAppName );
28+ $ this ->assertEquals ('/v2/app/johndoe/brancher / ' , $ request ->getUri ());
29+ $ this ->assertEquals ('johndoe-eph123456 ' , $ brancherAppName );
3030 }
3131
32- public function testCreateEphemeralAppRaisesClientExceptions ()
32+ public function testCreateBrancherAppRaisesClientExceptions ()
3333 {
3434 $ badRequestResponse = new Response (400 , [], json_encode ([
3535 'non_field_errors ' => ['Your request was invalid. ' ]
@@ -38,10 +38,10 @@ public function testCreateEphemeralAppRaisesClientExceptions()
3838
3939 $ this ->expectExceptionObject (new HypernodeApiClientException ($ badRequestResponse ));
4040
41- $ this ->client ->ephemeralApp ->create ('johndoe ' );
41+ $ this ->client ->brancherApp ->create ('johndoe ' );
4242 }
4343
44- public function testCreateEphemeralAppRaisesServerExceptions ()
44+ public function testCreateBrancherAppRaisesServerExceptions ()
4545 {
4646 $ badRequestResponse = new Response (500 , [], json_encode ([
4747 'non_field_errors ' => ['Something went wrong processing your request. ' ]
@@ -50,23 +50,23 @@ public function testCreateEphemeralAppRaisesServerExceptions()
5050
5151 $ this ->expectExceptionObject (new HypernodeApiServerException ($ badRequestResponse ));
5252
53- $ this ->client ->ephemeralApp ->create ('johndoe ' );
53+ $ this ->client ->brancherApp ->create ('johndoe ' );
5454 }
5555
56- public function testCancelEphemeralApp ()
56+ public function testCancelBrancherApp ()
5757 {
5858 $ this ->responses ->append (
5959 new Response (204 , [], null ),
6060 );
6161
62- $ this ->client ->ephemeralApp ->cancel ('johndoe-eph123456 ' );
62+ $ this ->client ->brancherApp ->cancel ('johndoe-eph123456 ' );
6363
6464 $ request = $ this ->responses ->getLastRequest ();
6565 $ this ->assertEquals ('POST ' , $ request ->getMethod ());
6666 $ this ->assertEquals ('/v2/app/johndoe-eph123456/cancel/ ' , $ request ->getUri ());
6767 }
6868
69- public function testCancelEphemeralAppRaisesClientExceptions ()
69+ public function testCancelBrancherAppRaisesClientExceptions ()
7070 {
7171 $ badRequestResponse = new Response (400 , [], json_encode ([
7272 'non_field_errors ' => ['Your request was invalid. ' ]
@@ -75,10 +75,10 @@ public function testCancelEphemeralAppRaisesClientExceptions()
7575
7676 $ this ->expectExceptionObject (new HypernodeApiClientException ($ badRequestResponse ));
7777
78- $ this ->client ->ephemeralApp ->cancel ('johndoe ' );
78+ $ this ->client ->brancherApp ->cancel ('johndoe ' );
7979 }
8080
81- public function testCancelEphemeralAppRaisesServerExceptions ()
81+ public function testCancelBrancherAppRaisesServerExceptions ()
8282 {
8383 $ badRequestResponse = new Response (500 , [], json_encode ([
8484 'non_field_errors ' => ['Something went wrong processing your request. ' ]
@@ -87,6 +87,6 @@ public function testCancelEphemeralAppRaisesServerExceptions()
8787
8888 $ this ->expectExceptionObject (new HypernodeApiServerException ($ badRequestResponse ));
8989
90- $ this ->client ->ephemeralApp ->cancel ('johndoe ' );
90+ $ this ->client ->brancherApp ->cancel ('johndoe ' );
9191 }
9292}
0 commit comments